Commit 6242207c
Changed files (1)
app
controllers
app/controllers/categories_controller.rb
@@ -1,11 +1,6 @@
class CategoriesController < ApplicationController
- # GET /categories/fondant
def show
@category = Category.find_by_slug(params[:id])
- if @category
- @creations = Creation.includes(:user).joins(:categories).where(:categories => {:slug => params[:id]}).page(params[:page]).per(12)
- else
- redirect_to "/tags/#{params[:id]}"
- end
+ @creations = @category.creations.includes(:user).page(params[:page]).per(12)
end
end