Remove unused methods

This commit is contained in:
Dmitriy Zaporozhets 2013-01-05 13:11:15 +02:00
parent e3d7ce2cc4
commit 5a214ee6f1
10 changed files with 9 additions and 62 deletions

View file

@ -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) }