Class: OmniAuth::Identity::Models::ActiveRecord

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
OmniAuth::Identity::Model, SecurePassword
Defined in:
lib/omniauth/identity/models/active_record.rb

Constant Summary

Constants included from OmniAuth::Identity::Model

OmniAuth::Identity::Model::SCHEMA_ATTRIBUTES

Class Method Summary collapse

Methods included from SecurePassword

included

Methods included from OmniAuth::Identity::Model

#auth_key, #auth_key=, #authenticate, included, #info, #persisted?, #save, #uid

Class Method Details

.auth_key=(key) ⇒ Object



15
16
17
18
# File 'lib/omniauth/identity/models/active_record.rb', line 15

def self.auth_key=(key)
  super
  validates_uniqueness_of key, case_sensitive: false
end

.locate(search_hash) ⇒ Object



20
21
22
23
# File 'lib/omniauth/identity/models/active_record.rb', line 20

def self.locate(search_hash)
  search_hash = search_hash.reverse_merge!('provider' => 'identity') if column_names.include?('provider')
  where(search_hash).first
end