1. 01 9月, 2009 1 次提交
    • J
      I added this feature so that a Map of changed fields could be retrieved · 80989437
      Josh Sharpe 提交于
      after a model had been saved. This is useful in the after_save callback
      when you need to know what fields changed. At present there is no way
      to do this other than have code in the before_save callback that takes
      a copy of the changes Map, which I thought was a bit messy.
      
      Example.
      
        person = Person.find_by_name('bob')
        person.name = 'robert'
        person.changes # => {'name' => ['bob, 'robert']}
        person.save
        person.changes # => {}
        person.previous_changes # => {'name' => ['bob, 'robert']}
        person.reload
        person.previous_changes # => {}
      Signed-off-by: NJoshua Peek <josh@joshpeek.com>
      80989437
  2. 31 8月, 2009 2 次提交
  3. 30 8月, 2009 10 次提交
  4. 29 8月, 2009 2 次提交
  5. 28 8月, 2009 3 次提交
  6. 27 8月, 2009 15 次提交
  7. 26 8月, 2009 7 次提交