Class: Blog::PostCategoriesController
- Inherits:
-
Spree::BaseController
- Object
- Spree::BaseController
- Blog::PostCategoriesController
- Defined in:
- app/controllers/blog/post_categories_controller.rb
Instance Method Summary collapse
Instance Method Details
#get_sidebar ⇒ Object
13 14 15 16 17 |
# File 'app/controllers/blog/post_categories_controller.rb', line 13 def @archive_posts = Post.live.limit(10) @post_categories = PostCategory.all end |
#get_tags ⇒ Object
19 20 21 |
# File 'app/controllers/blog/post_categories_controller.rb', line 19 def @tags = Post.live.tag_counts.order('count DESC').limit(25) end |
#show ⇒ Object
7 8 9 10 11 |
# File 'app/controllers/blog/post_categories_controller.rb', line 7 def show @category = PostCategory.find_by_permalink(params[:id]) @posts = @category.posts.live @posts = @posts.page(params[:page]).per(Post.per_page) end |