Class: Kawara::CategoriesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/kawara/categories_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/kawara/categories_controller.rb', line 5

def index
  @categories = Kawara::Category.all
end

#showObject



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