Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_thanhnd
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
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
thanhnd
venjob_thanhnd
Commits
7f8e4bf7
Commit
7f8e4bf7
authored
Mar 13, 2020
by
thanhnd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix review 20200313 1
parent
1593bd44
Pipeline
#510
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app/controllers/jobs_controller.rb
+5
-2
No files found.
app/controllers/jobs_controller.rb
View file @
7f8e4bf7
class
JobsController
<
ApplicationController
def
show
@job_detail
=
Job
.
find
(
params
[
:id
])
#@job_detail = Job.find_by_id(params[:id]) > 0 ? Job.find_by_id(params[:id]) : 1
job_id
=
params
[
:id
].
to_i
>
0
?
params
[:
id
].
to_i
:
1
@job_detail
=
Job
.
find_by_id
(
job_id
)
end
def
index
...
...
@@ -10,7 +13,7 @@ class JobsController < ApplicationController
end
def
search
return
redirect_to
root_path
,
alert:
"Empty field!"
if
params
[
:search
].
nil
?
return
redirect_to
root_path
,
alert:
"Empty field!"
if
params
[
:search
].
blank
?
@search_job
=
Job
.
where
(
"job_name LIKE ?"
,
"%
#{
params
[
:search
]
}
%"
)
@pagin_job
=
@search_job
.
page
(
params
[
:page
]).
per
(
Settings
.
page
)
...
...
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