aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/refinery/blog/posts_controller.rb
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2011-07-27 22:32:26 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2011-07-27 22:32:26 +0300
commit164dc27a42876efdbd14db9e2d14311b4c119e52 (patch)
tree4a7e09dd7c8779942207d6eebe77c2c98e6029c2 /app/controllers/refinery/blog/posts_controller.rb
parentded42bc6916669f8025a10901484dc76dc26c4b2 (diff)
downloadrefinerycms-blog-164dc27a42876efdbd14db9e2d14311b4c119e52.tar.gz
refinerycms-blog-164dc27a42876efdbd14db9e2d14311b4c119e52.tar.bz2
refinerycms-blog-164dc27a42876efdbd14db9e2d14311b4c119e52.zip
Cucumber tag steps now pass.
Diffstat (limited to 'app/controllers/refinery/blog/posts_controller.rb')
-rw-r--r--app/controllers/refinery/blog/posts_controller.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb
index bdf53f0..f055797 100644
--- a/app/controllers/refinery/blog/posts_controller.rb
+++ b/app/controllers/refinery/blog/posts_controller.rb
@@ -73,10 +73,9 @@ module Refinery
def tagged
@tag = ActsAsTaggableOn::Tag.find(params[:tag_id])
@tag_name = @tag.name
- @blog_posts = Refinery::BlogPost.tagged_with(@tag_name).paginate({
- :page => params[:page],
- :per_page => Refinery::Setting.find_or_set(:blog_posts_per_page, 10)
- })
+ @blog_posts = Refinery::BlogPost.tagged_with(@tag_name)
+ .page(params[:page])
+ .per(Refinery::Setting.find_or_set(:blog_posts_per_page, 10))
end
protected
@@ -92,10 +91,10 @@ module Refinery
end
def find_all_blog_posts
- @blog_posts = Refinery::BlogPost.live.includes(:comments, :categories).paginate({
- :page => params[:page],
- :per_page => Refinery::Setting.find_or_set(:blog_posts_per_page, 10)
- })
+ @blog_posts = Refinery::BlogPost.live
+ .includes(:comments, :categories)
+ .page(params[:page])
+ .per(Refinery::Setting.find_or_set(:blog_posts_per_page, 10))
end
def find_tags