Method: ActiveRecord::Store::HashAccessor.write

Defined in:
lib/active_record/store.rb

.write(object, attribute, key, value) ⇒ Object



226
227
228
229
230
231
232
# File 'lib/active_record/store.rb', line 226

def self.write(object, attribute, key, value)
  prepare(object, attribute)
  if value != read(object, attribute, key)
    object.public_send :"#{attribute}_will_change!"
    object.public_send(attribute)[key] = value
  end
end