@@ -27,7 +27,7 class Principal < ActiveRecord::Base | |||
|
27 | 27 | |
|
28 | 28 | named_scope :like, lambda {|q| |
|
29 | 29 | s = "%#{q.to_s.strip.downcase}%" |
|
30 |
{:conditions => ["LOWER(login) LIKE |
|
|
30 | {:conditions => ["LOWER(login) LIKE :s OR LOWER(firstname) LIKE :s OR LOWER(lastname) LIKE :s OR LOWER(mail) LIKE :s", {:s => s}], | |
|
31 | 31 | :order => 'type, login, lastname, firstname, mail' |
|
32 | 32 | } |
|
33 | 33 | } |
General Comments 0
You need to be logged in to leave comments.
Login now