Skip to content

Instantly share code, notes, and snippets.

@Mikr0Tik
Created January 18, 2010 13:56
Show Gist options
  • Save Mikr0Tik/280022 to your computer and use it in GitHub Desktop.
Save Mikr0Tik/280022 to your computer and use it in GitHub Desktop.
p = Person.first
p.name = 'Smith'
p.save
p.updated_changes # --> {"name" => ['Connor', 'Smith']}
class Person < ActiveRecord::Base
after_update :after_update_changes
attr_accessor :updated_changes
def after_update_changes
@updated_changes = changes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment