Commit 1d262038 by Nguyen Quoc Kien

Fixed find_category #1

parent a163d341
......@@ -15,6 +15,8 @@ class CategoriesController < ApplicationController
def find_category
if params[:id].to_i > (Category.count + 1)
redirect_to error_path
elsif is_number?(params[:id]) == false
redirect_to error_path
else
@category = Category.find(params[:id])
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment