summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 6ad11e8f7ba..ee92d944b03 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -28,8 +28,8 @@ class Issue < ActiveRecord::Base
scope :cared, ->(user) { where(assignee_id: user) }
scope :authored, ->(user) { where(author_id: user) }
scope :open_for, ->(user) { opened.assigned(user) }
- scope :assigned, where("assignee_id IS NOT NULL")
- scope :unassigned, where("assignee_id IS NULL")
+ scope :assigned, -> { where("assignee_id IS NOT NULL") }
+ scope :unassigned, -> { where("assignee_id IS NULL") }
state_machine :state, initial: :opened do
event :close do