This project is archived and is in readonly mode.
Dynamic finders should go through AR::Base::find
Reported by Eloy Duran | October 3rd, 2008 @ 09:12 AM | in 2.x
This is so when people override ActiveRecord::Base::find, the new ::find method will also be invoked by the dynamic finders.
Associations, for instance, do go through ::find, so this makes it more consistent.
Comments and changes to this ticket
-
Pascal Ehlert October 3rd, 2008 @ 11:21 AM
+1 for that.. Highly appreciated from my side as I had the same problem when writing a plugin and never understood why we were using those methods anyway.
-
Eloy Duran October 3rd, 2008 @ 12:58 PM
I attached a newer version which also removes the unnecessary deprecation silence blocks.
-
Repository October 3rd, 2008 @ 08:44 PM
- State changed from new to committed
(from [8d337e9ec2e25007d557150dbe7557ab3c3bd05f]) Dynamic finders should use the ActiveRecord::Base::find method instead of ::find_initial, :find_last, and ::find_all.
This is so when people override ActiveRecord::Base::find, the new ::find method will also be invoked by the dynamic finders. Associations for instance do go through ::find, so this makes it more consistent. Also removed the unnecessary deprecation silence blocks.
Signed-off-by: Michael Koziarski michael@koziarski.com
[#1162 state:committed] 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
Referenced by
- 1162 Dynamic finders should go through AR::Base::find [#1162 state:committed] http://github.com/rails/rails/co...