From f1da7174cc66d70fe8e7352761873f9ff05ca8fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 27 Mar 2010 11:04:21 +0100 Subject: Fix tests added in previous commit. --- activemodel/lib/active_model/dirty.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activemodel/lib/active_model') 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' -- cgit v1.2.3