Permalink
Browse files

Merge pull request #1 from GeekOnCoffee/patch-1

Fixing find_all to exclude future posts
  • Loading branch information...
2 parents 818b0f2 + 861b3c8 commit f68f34ebf56354adc19323d12eebb3da3f4c62c1 @BDQ BDQ committed Sep 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/nesta/models.rb
View
@@ -186,7 +186,7 @@ def self.find_by_path(path)
end
def self.find_all
- super.select { |p| ! p.hidden? }
+ super.select { |p| ! p.hidden? }.select{ |p| p.date.nil? || p.date < DateTime.now }
end
def self.find_articles

0 comments on commit f68f34e

Please sign in to comment.