Commit 37c2419d by Xuan Trung Le

fix duplicate association eroor and delete industries_job_test.rb

parent 372fa75e
...@@ -2,8 +2,8 @@ class Job < ApplicationRecord ...@@ -2,8 +2,8 @@ class Job < ApplicationRecord
belongs_to :city belongs_to :city
belongs_to :company belongs_to :company
has_many :apply_jobs has_many :apply_jobs
has_many :users, through: :apply_jobs has_many :candidates, through: :apply_jobs, class_name: 'User', source: :user
has_many :favorite_jobs has_many :favorite_jobs
has_many :users, through: :favorite_jobs has_many :people_who_liked, through: :favorite_jobs, class_name: 'User', source: :user
has_and_belongs_to_many :industries has_and_belongs_to_many :industries
end end
class User < ApplicationRecord class User < ApplicationRecord
has_many :apply_jobs has_many :apply_jobs
has_many :jobs, through: :apply_jobs has_many :applied_jobs, through: :apply_jobs, class_name: 'Job', source: :job
has_many :favorite_jobs has_many :favorite_jobs
has_many :jobs, through: :favorite_jobs has_many :liked_jobs, through: :favorite_jobs, class_name: 'Job', source: :job
# Include default devise modules. Others available are: # Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable # :confirmable, :lockable, :timeoutable and :omniauthable
......
require 'test_helper'
class IndustriesJobTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
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