This project is archived and is in readonly mode.

#905 ✓resolved
Josh Susser

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

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>

Attachments

Referenced by

Pages