This project is archived and is in readonly mode.
dynamic finder refactoring and bang version
Reported by Josh Susser | August 26th, 2008 @ 05:38 AM
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.
Comments and changes to this ticket
-
josh August 26th, 2008 @ 06:17 AM
- State changed from new to open
- Assigned user set to Jeremy Kemper
- Milestone cleared.
+1
-
Repository August 26th, 2008 @ 07:34 AM
- State changed from open to resolved
(from [1092c181b5568d06e84f6a3253aaca81c02a2b2c]) add dynamic finder bang version to raise RecordNotFound
[#905 state:resolved]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 905 dynamic finder refactoring and bang version [#905 state:resolved]