Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venshop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Nguyen Quoc Kien
venshop
Commits
1d262038
Commit
1d262038
authored
Aug 05, 2015
by
Nguyen Quoc Kien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed find_category #1
parent
a163d341
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
app/controllers/categories_controller.rb
+2
-0
No files found.
app/controllers/categories_controller.rb
View file @
1d262038
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment