All scopes must be in lambdas
This commit is contained in:
parent
9a22ac63ec
commit
b5db541338
9 changed files with 22 additions and 22 deletions
|
@ -32,10 +32,10 @@ class UsersProject < ActiveRecord::Base
|
|||
|
||||
delegate :name, :username, :email, to: :user, prefix: true
|
||||
|
||||
scope :guests, where(project_access: GUEST)
|
||||
scope :reporters, where(project_access: REPORTER)
|
||||
scope :developers, where(project_access: DEVELOPER)
|
||||
scope :masters, where(project_access: MASTER)
|
||||
scope :guests, -> { where(project_access: GUEST) }
|
||||
scope :reporters, -> { where(project_access: REPORTER) }
|
||||
scope :developers, -> { where(project_access: DEVELOPER) }
|
||||
scope :masters, -> { where(project_access: MASTER) }
|
||||
|
||||
scope :in_project, ->(project) { where(project_id: project.id) }
|
||||
scope :in_projects, ->(projects) { where(project_id: project_ids) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue