Class: BlogCategoriesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- BlogCategoriesController
- Defined in:
- app/controllers/blog_categories_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#index ⇒ Object
4 5 6 |
# File 'app/controllers/blog_categories_controller.rb', line 4 def index @blog_categories = BlogCategory.roots_with_posts end |
#show ⇒ Object
8 9 10 11 12 13 |
# File 'app/controllers/blog_categories_controller.rb', line 8 def show if @blog_category.blank? flash[:notice] = "That category doesn't exist." redirect_to Blog.first.path end end |