class method
self.write
Ruby on Rails 4.1.16
Since v4.1.16 Last seen in v4.1.16Signature
self.write(object, attribute, key, value)
No documentation comment.
Parameters
-
objectreq -
attributereq -
keyreq -
valuereq
Source
# File activerecord/lib/active_record/store.rb, line 141
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
Defined in activerecord/lib/active_record/store.rb line 141
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Store::HashAccessor