perfomance fix
This commit is contained in:
parent
762946995e
commit
6b9f221a27
3 changed files with 16 additions and 4 deletions
|
@ -30,6 +30,8 @@ class Note < ActiveRecord::Base
|
|||
scope :last_week, where("created_at >= :date", :date => (Date.today - 7.days))
|
||||
scope :since, lambda { |day| where("created_at >= :date", :date => (day)) }
|
||||
scope :fresh, order("created_at DESC")
|
||||
scope :inc_author_project, includes(:project, :author)
|
||||
scope :inc_author, includes(:author)
|
||||
|
||||
mount_uploader :attachment, AttachmentUploader
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue