module ActiveRecord::Encryption::ExtendedDeterministicQueries::RelationQueries

Public Instance Methods

exists?(*args) click to toggle source
Calls superclass method
# File lib/active_record/encryption/extended_deterministic_queries.rb, line 89
def exists?(*args)
  process_encrypted_query_arguments_if_needed(args)
  super
end
find_or_create_by(attributes, &block) click to toggle source
# File lib/active_record/encryption/extended_deterministic_queries.rb, line 94
def find_or_create_by(attributes, &block)
  find_by(attributes.dup) || create(attributes, &block)
end
find_or_create_by!(attributes, &block) click to toggle source
# File lib/active_record/encryption/extended_deterministic_queries.rb, line 98
def find_or_create_by!(attributes, &block)
  find_by(attributes.dup) || create!(attributes, &block)
end
where(*args) click to toggle source
Calls superclass method
# File lib/active_record/encryption/extended_deterministic_queries.rb, line 84
def where(*args)
  process_encrypted_query_arguments_if_needed(args)
  super
end

Private Instance Methods

process_encrypted_query_arguments_if_needed(args) click to toggle source
# File lib/active_record/encryption/extended_deterministic_queries.rb, line 103
def process_encrypted_query_arguments_if_needed(args)
  process_encrypted_query_arguments(args, true) unless self.deterministic_encrypted_attributes&.empty?
end