This project is archived and is in readonly mode.
Add support for before and after add/remove callbacks to belongs_to associations
Reported by sob | December 12th, 2008 @ 05:32 AM | in 3.x
belongs_to currently does not support before/after_add/remove callbacks as has_many does. There are a variety of applications in which this is beneficial. I found an original ticket from a few years ago but it only implemented the before/after_add callbacks and did not apply cleanly any more.
I've reworked the existing patch from the link below to support all necessary callbacks including before_add, before_remove, after_add, and after_remove. More information on the original request can be found on the ticket here:
http://dev.rubyonrails.org/ticke...
Thanks!
- sob
Comments and changes to this ticket
-
sob December 12th, 2008 @ 11:50 PM
- Assigned user set to Jeremy Kemper
- Tag changed from belongs_to, callbacks to belongs_to, callbacks, pa, patch
-
Pratik March 8th, 2009 @ 12:50 PM
- Assigned user changed from Jeremy Kemper to Pratik
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>