method

configure

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: Configurable
configure(primary_key:, deterministic_key:, key_derivation_salt:, **properties) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/encryption/configurable.rb, line 20
        def configure(primary_key,, deterministic_key,, key_derivation_salt,, **properties) # :nodoc:
          config.primary_key = primary_key
          config.deterministic_key = deterministic_key
          config.key_derivation_salt = key_derivation_salt

          context.key_provider = ActiveRecord::Encryption::DerivedSecretKeyProvider.new(primary_key)

          properties.each do |name, value|
            [:context, :config].each do |configurable_object_name|
              configurable_object = ActiveRecord::Encryption.send(configurable_object_name)
              configurable_object.send "#{name}=", value if configurable_object.respond_to?("#{name}=")
            end
          end
        end
Register or log in to add new notes.