Sha256: a9ff2523d2bb2996ed344f3304e7546b6798550a705f2b6d8a455d2306cfaeaf
Contents?: true
Size: 848 Bytes
Versions: 4
Compression:
Stored size: 848 Bytes
Contents
=begin 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 =end class Blog::CategoriesController < BlogController layout 'home' #including Settings Helper include SettingsHelper before_filter :load_css, :find_tags #show to show category per id 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 #load_assets includes all css files for this controller def load_css AssetManager.include_css [:blog_home, :home] end #finding tags for blog posts def find_tags @tags = BlogPost.tag_counts_on(:tags) end end
Version data entries
4 entries across 4 versions & 1 rubygems