instance method []=

Ruby on Rails 7.1.6

Since v7.0.10

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

[]=(key, value)

Set a value for a given key

It will raise an EncryptedContentIntegrity if the value exists

Parameters

key req
value req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close