aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/store.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/store.rb')
-rw-r--r--activerecord/lib/active_record/store.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/store.rb b/activerecord/lib/active_record/store.rb
index b4013ecc1e..25f528498e 100644
--- a/activerecord/lib/active_record/store.rb
+++ b/activerecord/lib/active_record/store.rb
@@ -57,8 +57,8 @@ module ActiveRecord
define_method("#{key}=") do |value|
attribute = initialize_store_attribute(store_attribute)
if value != attribute[key]
- attribute[key] = value
send :"#{store_attribute}_will_change!"
+ attribute[key] = value
end
end
@@ -67,7 +67,8 @@ module ActiveRecord
end
end
- self.stored_attributes[store_attribute] = keys
+ self.stored_attributes[store_attribute] ||= []
+ self.stored_attributes[store_attribute] |= keys
end
end