summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorDrew <bowmande@gmail.com>2011-11-18 01:52:13 -0500
committerDrew <bowmande@gmail.com>2011-11-18 01:52:13 -0500
commit91d5a906f9cd1f120312d1ca72c8e500263c4439 (patch)
treea6283aea66d4a84f0cba3bb5c5e8c5c176489d8a /app/models/note.rb
parent15016ae68dd2e59ce1b12b0be6e9870d16219569 (diff)
downloadgitlab-ce-91d5a906f9cd1f120312d1ca72c8e500263c4439.tar.gz
Resolved issue #235
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")