Add groups to search autocomplete. Use alphabetically scope for users order

This commit is contained in:
Dmitriy Zaporozhets 2012-12-30 13:50:23 +02:00
parent e37a043df7
commit a16533a04a
6 changed files with 8 additions and 6 deletions

View file

@ -80,6 +80,7 @@ class User < ActiveRecord::Base
scope :admins, where(admin: true)
scope :blocked, where(blocked: true)
scope :active, where(blocked: false)
scope :alphabetically, order('name ASC')
class << self
def filter filter_name