aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/refinery/blog/post.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/refinery/blog/post.rb b/app/models/refinery/blog/post.rb
index cf0a526..b991962 100644
--- a/app/models/refinery/blog/post.rb
+++ b/app/models/refinery/blog/post.rb
@@ -127,7 +127,7 @@ module Refinery
end
def next(current_record)
- where(["published_at > ? and draft = ?", current_record.published_at, false]).reorder('published_at ASC').with_globalize.first
+ where(["published_at > ? and published_at <= ? and draft = ?", current_record.published_at, Time::now, false]).reorder('published_at ASC').with_globalize.first
end
def published_before(date=Time.now)