summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-05 13:11:15 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-05 13:11:15 +0200
commit5a214ee6f198a90f41a54b3dd7f2ff6a318a8deb (patch)
treecd1f0645953fede0a55e9ab55e7a29f41480c983 /app/models/note.rb
parente3d7ce2cc482a730b2dc63ca09057b22a960b998 (diff)
downloadgitlab-ce-5a214ee6f198a90f41a54b3dd7f2ff6a318a8deb.tar.gz
Remove unused methods
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index abd89a8a46e..b055ae623b2 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -42,11 +42,11 @@ class Note < ActiveRecord::Base
mount_uploader :attachment, AttachmentUploader
# Scopes
- scope :for_commits, ->{ where(noteable_type: "Commit") }
+ 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 :common, ->{ where(noteable_type: ["", nil]) }
- scope :today, ->{ where("created_at >= :date", date: Date.today) }
- scope :last_week, ->{ where("created_at >= :date", date: (Date.today - 7.days)) }
- scope :since, ->(day) { where("created_at >= :date", date: (day)) }
scope :fresh, ->{ order("created_at ASC, id ASC") }
scope :inc_author_project, ->{ includes(:project, :author) }
scope :inc_author, ->{ includes(:author) }