Commit 35ed72e5 by Xuan Trung Le

Fix creating db

parent 1030295e
class IndustriesJob < ApplicationRecord
belongs_to :industry
belongs_to :job
end
class Industry < ApplicationRecord
has_many :industries_jobs
has_many :jobs, through: :industries_jobs
has_and_belongs_to_many :jobs
end
......@@ -2,9 +2,8 @@ class Job < ApplicationRecord
belongs_to :city
belongs_to :company
has_many :apply_jobs
has_many :users, through: :favorite_jobs
has_many :users, through: :apply_jobs
has_many :favorite_jobs
has_many :users, through: :favorite_jobs
has_many :industries_jobs
has_many :industries, through: :industries_jobs
has_and_belongs_to_many :industries
end
class User < ApplicationRecord
has_many :apply_jobs
has_many :jobs, through: :favorite_jobs
has_many :jobs, through: :apply_jobs
has_many :favorite_jobs
has_many :jobs, through: :favorite_jobs
......
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