Class: Blog::CategoriesController
- Inherits:
-
BlogController
- Object
- BlogController
- Blog::CategoriesController
- Includes:
- SettingsHelper
- Defined in:
- app/controllers/blog/categories_controller.rb
Overview
Name: Categories controller Use: Creating , modifying, deleting blog categories for the cms Created date: 27-06-2012
Modified date: 27-06-2012
Company : Mindfire Solutions
Instance Method Summary collapse
-
#find_tags ⇒ Object
finding tags for blog posts.
-
#load_css ⇒ Object
load_assets includes all css files for this controller.
-
#show ⇒ Object
show to show category per id.
Methods included from SettingsHelper
#blog_posts_per_page, commentable, moderatable, uncommentable, unmoderatable
Instance Method Details
#find_tags ⇒ Object
finding tags for blog posts
31 32 33 |
# File 'app/controllers/blog/categories_controller.rb', line 31 def @tags = BlogPost.tag_counts_on(:tags) end |
#load_css ⇒ Object
load_assets includes all css files for this controller
26 27 28 |
# File 'app/controllers/blog/categories_controller.rb', line 26 def load_css AssetManager.include_css [:blog_home, :home] end |
#show ⇒ Object
show to show category per id
17 18 19 20 21 22 23 |
# File 'app/controllers/blog/categories_controller.rb', line 17 def show @category = BlogCategory.find(params[:id]) @blog_posts = @category.posts.live.includes(:comments, :categories).paginate({ :page => params[:page], :per_page => blog_posts_per_page }) end |