instance method
[]=
Ruby on Rails 7.0.10
Since v7.0.10Signature
[]=(key, value)
Set a value for a given key
It will raise an EncryptedContentIntegrity if the value exists
Parameters
-
keyreq -
valuereq
Source
# File activerecord/lib/active_record/encryption/properties.rb, line 50
def []=(key, value)
raise Errors::EncryptedContentIntegrity, "Properties can't be overridden: #{key}" if key?(key)
validate_value_type(value)
data[key] = value
end
Defined in activerecord/lib/active_record/encryption/properties.rb line 50
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Encryption::Properties