This project is archived and is in readonly mode.
observers should not add an after_find method to the observed class
Reported by Stefan Kaes | July 15th, 2008 @ 07:16 PM | in 2.1.1
Observers should not modify observed classes by defining an empty after_find method on the observed class.
First, it's evil to silently add a method.
Second, it slows down instantiating objects of the observed class, because executing the callback chain is expensive. I measure 10-20% difference for my application.
Comments and changes to this ticket
-
Stefan Kaes July 15th, 2008 @ 08:02 PM
- no changes were found...
-
Jeremy Kemper July 16th, 2008 @ 12:48 AM
- Milestone changed from 2.x to 2.1.1
- State changed from new to open
- Assigned user set to Jeremy Kemper
-
Repository July 16th, 2008 @ 01:03 AM
- State changed from open to resolved
(from [6caaa0251610891887cfcfa4e20fe1dfa5fd70c9]) Observers not longer add an after_find method to the observed class.
[#625 state:resolved]
-
Repository July 16th, 2008 @ 01:03 AM
(from [fbef982e4b906b879240a35a1ecff447007da6b2]) Observers not longer add an after_find method to the observed class.
[#625 state:resolved]
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
- 676 Let observers create after_find if they need it Ticket #625 removed the line that caused observers to de...