Skip to content

Instantly share code, notes, and snippets.

@saifis
Created December 23, 2010 14:16
Show Gist options
  • Save saifis/753029 to your computer and use it in GitHub Desktop.
Save saifis/753029 to your computer and use it in GitHub Desktop.
aa = AAA.new
aa.foo = [ { :aa => "aa", :bb => "bb", :cc => {"foo", "bar" } } ]
aa.save
aa.versions
[#<Version id: 1, item_type: "AAA", item_id: 1, event: "create", whodunnit: nil, object: nil, created_at: "2010-12-23 14:14:32">]
aa.foo[0][:cc]["foo"] = "barbar"
aa.save
a.versions
[#<Version id: 1, item_type: "AAA", item_id: 1, event: "create", whodunnit: nil, object: nil, created_at: "2010-12-23 14:14:32">]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment