Update Notes JS for reversed notes

This commit is contained in:
Riyad Preukschas 2012-09-14 17:01:34 +02:00
parent 7563abbe49
commit 07eec9c66a
4 changed files with 27 additions and 11 deletions

View file

@ -36,7 +36,7 @@ class Note < ActiveRecord::Base
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 ASC")
scope :fresh, order("created_at ASC, id ASC")
scope :inc_author_project, includes(:project, :author)
scope :inc_author, includes(:author)