summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 0ec63f8b6a2..946f506264a 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -27,6 +27,7 @@ class Note < ActiveRecord::Base
scope :common, where(:noteable_id => nil)
+ scope :today, where("created_at >= :date", :date => Date.today)
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")