Spianch test for group dashboard
This commit is contained in:
parent
224fb5770c
commit
8b76e30656
6 changed files with 68 additions and 13 deletions
|
@ -22,6 +22,10 @@ class Group < ActiveRecord::Base
|
|||
|
||||
delegate :name, to: :owner, allow_nil: true, prefix: true
|
||||
|
||||
def self.search query
|
||||
where("name like :query or code like :query", query: "%#{query}%")
|
||||
end
|
||||
|
||||
def to_param
|
||||
code
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue