Commit 0dea1595 by Đường Sỹ Hoàng

Added company_id

parent 164d7f0e
...@@ -22,7 +22,7 @@ namespace :job do ...@@ -22,7 +22,7 @@ namespace :job do
salary: row["salary"], salary: row["salary"],
requirement: row["requirement"] requirement: row["requirement"]
} }
job = Job.find_or_initialize_by(title: row["name"]) job = Job.find_or_initialize_by(title: row["name"], company_id: company.id)
job.update(job_params) job.update(job_params)
rescue rescue
import_logger = ActiveSupport::Logger.new("log/import.log") import_logger = ActiveSupport::Logger.new("log/import.log")
......
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