aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJeff Shumate <jeff@catapulsion.net>2012-02-22 20:37:08 -0700
committerJeff Shumate <jeff@catapulsion.net>2012-02-22 20:37:08 -0700
commit4f0b5f8223426644924807fc38f86ec245f4827b (patch)
tree28f4f4f2e59ea65e6c68adf416fa8220e1404a01 /app/controllers
parent45cad84f4986ec9a1d78a5ced1a842f7a9048b5d (diff)
downloadrefinerycms-blog-4f0b5f8223426644924807fc38f86ec245f4827b.tar.gz
refinerycms-blog-4f0b5f8223426644924807fc38f86ec245f4827b.tar.bz2
refinerycms-blog-4f0b5f8223426644924807fc38f86ec245f4827b.zip
add popularity counter to blog posts as well as accessor for recent posts
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/refinery/blog/posts_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb
index abd60f4..3309024 100644
--- a/app/controllers/refinery/blog/posts_controller.rb
+++ b/app/controllers/refinery/blog/posts_controller.rb
@@ -23,6 +23,8 @@ module Refinery
@comment = Comment.new
@canonical = url_for(:locale => ::Refinery::I18n.default_frontend_locale) if canonical?
+
+ @post.increment!(:access_count,1)
respond_with (@post) do |format|
format.html { present(@post) }