Class: CategoriesController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
9
10
# File 'app/controllers/categories_controller.rb', line 6

def index
  # you can use meta fields from your model instead (e.g. browser_title)
  # by swapping @page for @category in the line below:
  present(@page)
end

#showObject



12
13
14
15
16
17
18
19
20
# File 'app/controllers/categories_controller.rb', line 12

def show
  @category = Category.find(params[:id])

  # redirect_to category_products_path(@category)
  
  # you can use meta fields from your model instead (e.g. browser_title)
  # by swapping @page for @category in the line below:
  present(@page)
end