Created
January 18, 2010 13:56
-
-
Save Mikr0Tik/280022 to your computer and use it in GitHub Desktop.
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
p = Person.first | |
p.name = 'Smith' | |
p.save | |
p.updated_changes # --> {"name" => ['Connor', 'Smith']} |
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 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