This project is archived and is in readonly mode.
after_save_or_destroy
Reported by Michael Economy | April 27th, 2010 @ 01:32 AM
so currentl, if you want a callback to fire when an object is
deleted or saved... you have to do
def after_save
blah
end
def after_destroy
blah
end
what if there was a new callback called after_save_or_destroy?
then i'd jsut do:
def after_save_or_destroy
blah
end
DRY
Comments and changes to this ticket
-
Ryan Bigg April 27th, 2010 @ 04:50 AM
- State changed from new to invalid
Create a plugin that provides this functionality. Should not be core imo.
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>