module OmniAuth::Identity::Models::Mongoid
Mongoid
is an ORM adapter for MongoDB:
https://github.com/mongodb/mongoid
NOTE: Mongoid
is based on ActiveModel.
Public Class Methods
auth_key=(key)
click to toggle source
Calls superclass method
OmniAuth::Identity::Model#auth_key=
# File lib/omniauth/identity/models/mongoid.rb, line 19 def self.auth_key=(key) super validates_uniqueness_of key, case_sensitive: false end
included(base)
click to toggle source
# File lib/omniauth/identity/models/mongoid.rb, line 12 def self.included(base) base.class_eval do include ::OmniAuth::Identity::Model include ::OmniAuth::Identity::SecurePassword has_secure_password def self.auth_key=(key) super validates_uniqueness_of key, case_sensitive: false end def self.locate(search_hash) where(search_hash).first end end end
locate(search_hash)
click to toggle source
# File lib/omniauth/identity/models/mongoid.rb, line 24 def self.locate(search_hash) where(search_hash).first end