summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-02-12 11:16:45 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-02-12 11:16:45 +0400
commitb5db541338314b01423d79fb9155e8c4ddc5d494 (patch)
treee6d48ebfb77a74054974b58327ef99d596d00ea6 /app/models/note.rb
parent9a22ac63eca587d5efd56d626b7579236734cda0 (diff)
downloadgitlab-ce-b5db541338314b01423d79fb9155e8c4ddc5d494.tar.gz
All scopes must be in lambdas
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index ded126b4bf1..97f6bf6e3a7 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -43,8 +43,8 @@ class Note < ActiveRecord::Base
# Scopes
scope :for_commit_id, ->(commit_id) { where(noteable_type: "Commit", commit_id: commit_id) }
- scope :inline, where("line_code IS NOT NULL")
- scope :not_inline, where("line_code IS NULL")
+ scope :inline, -> { where("line_code IS NOT NULL") }
+ scope :not_inline, -> { where("line_code IS NULL") }
scope :common, ->{ where(noteable_type: ["", nil]) }
scope :fresh, ->{ order("created_at ASC, id ASC") }