This commit is contained in:
Nicolas Bally 2015-04-12 17:37:59 +02:00
parent bdeb5813a4
commit c99b993fb5

View File

@ -37,7 +37,7 @@ class Article < ActiveRecord::Base
end
scope :recents, -> {where("enabled = ?",true ).order("published_at DESC, created_at DESC")}
scope :recents, -> {before(Time.now).where("enabled = ?",true ).order("published_at DESC, created_at DESC")}
scope :between, lambda { |start, stop|
after(start).before(stop)