All scopes must be in lambdas
This commit is contained in:
parent
9a22ac63ec
commit
b5db541338
9 changed files with 22 additions and 22 deletions
|
@ -29,7 +29,7 @@ class Namespace < ActiveRecord::Base
|
|||
after_update :move_dir
|
||||
after_destroy :rm_dir
|
||||
|
||||
scope :root, where('type IS NULL')
|
||||
scope :root, -> { where('type IS NULL') }
|
||||
|
||||
def self.search query
|
||||
where("name LIKE :query OR path LIKE :query", query: "%#{query}%")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue