style admin -> users page. Search by username too
This commit is contained in:
parent
fd5dc597ed
commit
6b24c375cb
2 changed files with 57 additions and 53 deletions
|
@ -138,7 +138,7 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def search query
|
||||
where("name LIKE :query or email LIKE :query", query: "%#{query}%")
|
||||
where("name LIKE :query OR email LIKE :query OR username LIKE :query", query: "%#{query}%")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue