method
store_accessor
v3.2.1 -
Show latest stable
- Class:
ActiveRecord::Store::ClassMethods
store_accessor(store_attribute, *keys)public
No documentation available.
# File activerecord/lib/active_record/store.rb, line 36
def store_accessor(store_attribute, *keys)
Array(keys).flatten.each do |key|
define_method("#{key}=") do |value|
send(store_attribute)[key] = value
send("#{store_attribute}_will_change!")
end
define_method(key) do
send(store_attribute)[key]
end
end
end