All scopes must be in lambdas
This commit is contained in:
parent
9a22ac63ec
commit
b5db541338
9 changed files with 22 additions and 22 deletions
|
@ -91,7 +91,7 @@ class Project < ActiveRecord::Base
|
|||
scope :sorted_by_activity, ->() { order("(SELECT max(events.created_at) FROM events WHERE events.project_id = projects.id) DESC") }
|
||||
scope :personal, ->(user) { where(namespace_id: user.namespace_id) }
|
||||
scope :joined, ->(user) { where("namespace_id != ?", user.namespace_id) }
|
||||
scope :public, where(public: true)
|
||||
scope :public, -> { where(public: true) }
|
||||
|
||||
class << self
|
||||
def abandoned
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue