fix not inline comments being hidden cause line_code = ''

This commit is contained in:
Dmitriy Zaporozhets 2013-04-04 09:50:18 +03:00
parent f121806ad0
commit 64fb2c595a
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ 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 :not_inline, -> { where(line_code: [nil, '']) }
scope :common, ->{ where(noteable_type: ["", nil]) }
scope :fresh, ->{ order("created_at ASC, id ASC") }