Skip to content

Instantly share code, notes, and snippets.

@anithri
Created March 3, 2011 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anithri/853303 to your computer and use it in GitHub Desktop.
Save anithri/853303 to your computer and use it in GitHub Desktop.
Callback is run twice.
require 'paper_trail'
class EventLog < ActiveRecord::Base
#snipped stuff
before_create :on_creation
before_save :on_save
after_save :after_save
#snipped stuff
def after_save
#do stuff
end
#snip more
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment