Commit 13bd3aaa by thanhnd

fix review job detail 20200302 1

parent 4ac4147c
Pipeline #489 failed with stages
in 0 seconds
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
......@@ -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
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
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