diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-27 11:04:21 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-27 11:04:21 +0100 |
commit | f1da7174cc66d70fe8e7352761873f9ff05ca8fa (patch) | |
tree | 5154a07fae5e2afb1bd0dcaa34a94aa6d815bec1 /activemodel/lib/active_model | |
parent | a5d637d86c02d911b07d48bdbfbc4f23fb59d720 (diff) | |
download | rails-f1da7174cc66d70fe8e7352761873f9ff05ca8fa.tar.gz rails-f1da7174cc66d70fe8e7352761873f9ff05ca8fa.tar.bz2 rails-f1da7174cc66d70fe8e7352761873f9ff05ca8fa.zip |
Fix tests added in previous commit.
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/dirty.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index 2f6b30dfed..57c594f159 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -86,6 +86,11 @@ module ActiveModel attribute_method_affix :prefix => 'reset_', :suffix => '!' end + def initialize(*) + @changed_attributes = {} + super + end + # Do any attributes have unsaved changes? # person.changed? # => false # person.name = 'bob' |