Commit 3c1f3bf1
Changed files (2)
app
controllers
config
app/controllers/categories_controller.rb
@@ -1,5 +1,5 @@
class CategoriesController < ApplicationController
- # GET /categories/1
+ # GET /categories/fondant
def show
@category = Category.where(:slug => params[:id]).first
@creations = Creation.joins(:categories).where(:categories => {:slug => params[:id]}).page(params[:page]).per(6)
config/routes.rb
@@ -22,6 +22,7 @@ Cake::Application.routes.draw do
# /categories
match 'categories/:id' => 'categories#show', :method => 'GET'
+ get 'categories/show'
# /authentications
match 'authentications' => 'authentications#index', :method => 'GET'