Created
December 10, 2010 18:27
-
-
Save jerodsanto/736565 to your computer and use it in GitHub Desktop.
this works in Rails 2, but not in Rails 3.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoMethodError: undefined method `_run_before_destroy_callbacks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ticket < ActiveRecord::Base | |
def destroy | |
return false if callback(:before_destroy) == false | |
self.deleted_at = current_time_from_proper_timezone | |
result = update_without_callbacks | |
callback(:after_destroy) | |
result | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment