Skip to content

Instantly share code, notes, and snippets.

@jerodsanto
Created December 10, 2010 18:27
Show Gist options
  • Save jerodsanto/736565 to your computer and use it in GitHub Desktop.
Save jerodsanto/736565 to your computer and use it in GitHub Desktop.
this works in Rails 2, but not in Rails 3.
NoMethodError: undefined method `_run_before_destroy_callbacks'
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