Module: Saucy::User::ClassMethods
- Defined in:
- lib/saucy/user.rb
Instance Method Summary collapse
Instance Method Details
#by_name ⇒ Object
27 28 29 |
# File 'lib/saucy/user.rb', line 27 def by_name order('users.name') end |
#search(query) ⇒ Object
23 24 25 26 |
# File 'lib/saucy/user.rb', line 23 def search(query) return [] if query.nil? where ['users.email like :query or users.name like :query', { :query => "%#{query}%" }] end |