mirror of
https://github.com/github/rails.git
synced 2026-01-09 14:48:01 -05:00
Merge pull request #10373 from janko-m/fix-store-accessor
Fix a bug in ActiveRecord::Store accessors
This commit is contained in:
@@ -37,8 +37,8 @@ module ActiveRecord
|
||||
Array(keys).flatten.each do |key|
|
||||
define_method("#{key}=") do |value|
|
||||
send("#{store_attribute}=", {}) unless send(store_attribute).is_a?(Hash)
|
||||
send(store_attribute)[key] = value
|
||||
send("#{store_attribute}_will_change!")
|
||||
send(store_attribute)[key] = value
|
||||
end
|
||||
|
||||
define_method(key) do
|
||||
|
||||
Reference in New Issue
Block a user