[#345] fix mistype

This commit is contained in:
Alexander Machehin 2014-03-25 23:34:04 +06:00
parent 64f969274d
commit 2d8a2bdc7c
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ module ActsLikeMember
) )
") ")
} }
scope :search_order, -> { order('CHAR_LENGTH(#{table_name}.uname) ASC') } scope :search_order, -> { order("CHAR_LENGTH(#{table_name}.uname) ASC") }
scope :without, ->(a) { where("#{table_name}.id NOT IN (?)", a) } scope :without, ->(a) { where("#{table_name}.id NOT IN (?)", a) }
scope :by_uname, ->(n) { where("#{table_name}.uname ILIKE ?", n) } scope :by_uname, ->(n) { where("#{table_name}.uname ILIKE ?", n) }
scope :search, ->(q) { by_uname("%#{q.to_s.strip}%") } scope :search, ->(q) { by_uname("%#{q.to_s.strip}%") }