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
13bd3aaa
Commit
13bd3aaa
authored
Mar 02, 2020
by
thanhnd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix review job detail 20200302 1
parent
4ac4147c
Pipeline
#489
failed with stages
in 0 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
5 deletions
+4
-5
app/controllers/jobs_controller.rb
+2
-3
app/models/job.rb
+0
-1
app/views/jobs/show.html.erb
+0
-0
config/routes.rb
+2
-1
No files found.
app/controllers/jobs_controller.rb
View file @
13bd3aaa
class
JobsController
<
ApplicationController
def
detail
job_id
=
params
[
:id
]
@job_detail
=
Job
.
find
(
job_id
)
def
show
@job_detail
=
Job
.
find
(
params
[
:id
])
end
end
app/models/job.rb
View file @
13bd3aaa
...
...
@@ -8,5 +8,4 @@ class Job < ApplicationRecord
belongs_to
:company
validates_presence_of
:job_name
scope
:latest_job
,
->
{
order
(
:last_updated
).
first
(
5
)}
#scope :detail_job, ->{joins(:company, :city).select('jobs.id,job_name,city_name,company_name,salary,description')}
end
app/views/jobs/
detail
.html.erb
→
app/views/jobs/
show
.html.erb
View file @
13bd3aaa
File moved
config/routes.rb
View file @
13bd3aaa
Rails
.
application
.
routes
.
draw
do
get
'/detail/:id'
,
to:
'jobs#
detail
'
get
'/detail/:id'
,
to:
'jobs#
show
'
root
'top_page#index'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
resources
:top_page
resources
:jobs
,
:show
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