Module: Devise::QueryCustomizers::FindRecord
- Defined in:
- lib/generators/devise/customize/helpers/query_customizers.rb
Class Method Summary collapse
Class Method Details
.active_record ⇒ Object
5 6 7 |
# File 'lib/generators/devise/customize/helpers/query_customizers.rb', line 5 def active_record %q{where(attributes).where(["username = :value OR email = :value", { :value => login }]).first} end |
.mongo_mapper ⇒ Object
13 14 15 |
# File 'lib/generators/devise/customize/helpers/query_customizers.rb', line 13 def mongo_mapper %q{where("function() {return this.username == '#{login}' || this.email == '#{login}'}").first} end |
.mongoid ⇒ Object
9 10 11 |
# File 'lib/generators/devise/customize/helpers/query_customizers.rb', line 9 def mongoid %q{where("function() {return this.username == '#{login}' || this.email == '#{login}'}").first} end |