Commit d82c2c39 by Xuan Trung Le

fix bugs

parent 38fd30a0
......@@ -43,9 +43,9 @@ class JobsController < ApplicationController
# byebug
condition = get_condition
response = query(condition)
job_id = response["response"]["docs"].pluck("id")
@jobs = Job.where(id: job_id).includes(:company).page(params[:page])
@jobs_count = job_id.count
job_ids = response["response"]["docs"].pluck("id")
@jobs = Job.where(id: job_ids).includes(:company).page(params[:page])
@jobs_count = job_ids.count
@result = params[:search]
render template: "jobs/job_lists"
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