Class: Kawara::CategoriesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Kawara::CategoriesController
- Defined in:
- app/controllers/kawara/categories_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 |
# File 'app/controllers/kawara/categories_controller.rb', line 5 def index @categories = Kawara::Category.all end |
#show ⇒ Object
9 10 11 12 |
# File 'app/controllers/kawara/categories_controller.rb', line 9 def show category = Kawara::Category.friendly.find(params[:id]) @articles = category.articles_latest end |