Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

dynamic finder refactoring and bang version

#905

This patch includes two commits:

1) An extract-class refactoring of the dynamic finder name matching code from AR::Base. The matching code is now in DynamicFinderMatch, which simplifies things a bit.

2) The ability to add a bang to a simple find_by dynamic finder. Person.find_by_name!("Josh") will raise a RecordNotFound error instead of returning nil.

Both commits include appropriate tests.

Reported by Josh Susser · August 26th, 2008 @ 05:38 AM

State: resolved
Milestone: none
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. josh
    josh
    • State changed from new to open
    • Assigned user set to Jeremy Kemper
    • Milestone cleared.

    +1

    August 26th, 2008 @ 06:17 AM

  2. Repository
    Repository
    • State changed from open to resolved

    (from [1092c181b5568d06e84f6a3253aaca81c02a2b2c]) add dynamic finder bang version to raise RecordNotFound

    [#905 dynamic finder refactoring and bang version state:resolved]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...

    August 26th, 2008 @ 07:34 AM