fix ID4

parent 1d619912
Pipeline #1380 failed with stages
in 0 seconds
class JobsController < ApplicationController class JobsController < ApplicationController
def show def show
if params[:city_slug].present? if params[:city_slug].present?
@city = City.find_by(slug: params[:city_slug]) city = City.find_by(slug: params[:city_slug])
@jobs = @city.jobs jobs = city.jobs
@result = @city.name @result = city.name
else else
@industry = Industry.find_by(slug: params[:industry_slug]) industry = Industry.find_by(slug: params[:industry_slug])
@jobs = @industry.jobs jobs = industry.jobs
@result = @industry.name @result = industry.name
end end
@total = @jobs.count @total = jobs.count
@jobs = @jobs.latest_jobs.page(params[:page]) @jobs = jobs.latest_jobs.page(params[:page])
end end
end end
\ No newline at end of file
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