This project is archived and is in readonly mode.
Let observers create after_find if they need it
Reported by George Ogata | July 22nd, 2008 @ 10:19 PM | in 2.x
Ticket #625 removed the line that caused observers to define an after_find method in the model if it didn't exist yet. This caused a speed-up (defining after_find can slow things down), but for cases where after_find is observed and not defined in the model, it means that an empty after_find must be explicitly defined in the model. It can be tricky to work out why an observer is failing due to this.
This patch restores the previous behavior, but only if the observer actually has an after_find defined. Hopefully, this offers the best of both worlds.
Comments and changes to this ticket
-
Pratik July 26th, 2008 @ 03:20 PM
- Assigned user set to Michael Koziarski
-
Repository July 26th, 2008 @ 03:26 PM
- State changed from new to resolved
(from [e8fc894f66daa7909d1790f2cd145844d256d282]) Make observers define #after_find in the model only if needed.
[#676 state:resolved]
Signed-off-by: Michael Koziarski
-
Repository August 25th, 2008 @ 09:28 AM
(from [473d8d04624cb5e699759eb9d41d52f1323122dd]) Make observers define #after_find in the model only if needed.
[#676 state:resolved] Signed-off-by: Michael Koziarski michael@koziarski.com 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
- 676 Let observers create after_find if they need it [#676 state:resolved] Signed-off-by: Michael Koziarski mi...