aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-27 11:04:21 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-27 11:04:21 +0100
commitf1da7174cc66d70fe8e7352761873f9ff05ca8fa (patch)
tree5154a07fae5e2afb1bd0dcaa34a94aa6d815bec1 /activemodel/lib
parenta5d637d86c02d911b07d48bdbfbc4f23fb59d720 (diff)
downloadrails-f1da7174cc66d70fe8e7352761873f9ff05ca8fa.tar.gz
rails-f1da7174cc66d70fe8e7352761873f9ff05ca8fa.tar.bz2
rails-f1da7174cc66d70fe8e7352761873f9ff05ca8fa.zip
Fix tests added in previous commit.
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/dirty.rb5
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'