recents
This commit is contained in:
parent
bdeb5813a4
commit
c99b993fb5
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user