aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/refinery/blog/posts_controller.rb2
-rw-r--r--app/models/refinery/blog/post.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb
index 3309024..bde3a9c 100644
--- a/app/controllers/refinery/blog/posts_controller.rb
+++ b/app/controllers/refinery/blog/posts_controller.rb
@@ -24,7 +24,7 @@ module Refinery
@canonical = url_for(:locale => ::Refinery::I18n.default_frontend_locale) if canonical?
- @post.increment!(:access_count,1)
+ @post.increment!(:access_count, 1)
respond_with (@post) do |format|
format.html { present(@post) }
diff --git a/app/models/refinery/blog/post.rb b/app/models/refinery/blog/post.rb
index d114dff..522e000 100644
--- a/app/models/refinery/blog/post.rb
+++ b/app/models/refinery/blog/post.rb
@@ -80,7 +80,7 @@ module Refinery
end
def recent(count)
- where("published_at <= ? and draft = ?", Time.now, false).limit(count)
+ live.limit(count)
end
def popular(count)