Skip to Content Skip to Search

Configuration API for ActiveRecord::Encryption

Methods
E
O

Instance Public methods

excluded_from_filter_parameters?(filter_parameter)

# File activerecord/lib/active_record/encryption/configurable.rb, line 61
def excluded_from_filter_parameters?(filter_parameter)
  ActiveRecord::Encryption.config.excluded_from_filter_parameters.find { |excluded_filter| excluded_filter.to_s == filter_parameter }
end

on_encrypted_attribute_declared(&block)

Register callback to be invoked when an encrypted attribute is declared.

Example:

ActiveRecord::Encryption.on_encrypted_attribute_declared do |klass, attribute_name|
  ...
end
# File activerecord/lib/active_record/encryption/configurable.rb, line 42
def on_encrypted_attribute_declared(&block)
  self.encrypted_attribute_declaration_listeners ||= Concurrent::Array.new
  self.encrypted_attribute_declaration_listeners << block
end