Module: MerbAuth::Adapter::DataMapper::Map::ClassMethods

Defined in:
lib/merb-auth/adapters/datamapper/map.rb

Instance Method Summary collapse

Instance Method Details

#clear_database_tableObject



27
28
29
# File 'lib/merb-auth/adapters/datamapper/map.rb', line 27

def clear_database_table
  auto_migrate!
end

#find_active_with_conditions(conditions) ⇒ Object



23
24
25
# File 'lib/merb-auth/adapters/datamapper/map.rb', line 23

def find_active_with_conditions(conditions)
  first(conditions.merge(:activated_at.not => nil))
end

#find_all_with_login_like(logn) ⇒ Object



19
20
21
# File 'lib/merb-auth/adapters/datamapper/map.rb', line 19

def (logn)
  all(:login.like => logn, :order => [:login.desc], :limit => 1)
end

#find_with_conditions(conditions) ⇒ Object



15
16
17
# File 'lib/merb-auth/adapters/datamapper/map.rb', line 15

def find_with_conditions(conditions)
  first(conditions)
end