Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xuan Trung Le
venjob
Commits
37c2419d
Commit
37c2419d
authored
Oct 02, 2017
by
Xuan Trung Le
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix duplicate association eroor and delete industries_job_test.rb
parent
372fa75e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
11 deletions
+4
-11
app/models/job.rb
+2
-2
app/models/user.rb
+2
-2
test/models/industries_job_test.rb
+0
-7
No files found.
app/models/job.rb
View file @
37c2419d
...
...
@@ -2,8 +2,8 @@ class Job < ApplicationRecord
belongs_to
:city
belongs_to
:company
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
:
users
,
through: :favorite_jobs
has_many
:
people_who_liked
,
through: :favorite_jobs
,
class_name:
'User'
,
source: :user
has_and_belongs_to_many
:industries
end
app/models/user.rb
View file @
37c2419d
class
User
<
ApplicationRecord
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
:
jobs
,
through: :favorite_jobs
has_many
:
liked_jobs
,
through: :favorite_jobs
,
class_name:
'Job'
,
source: :job
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
...
...
test/models/industries_job_test.rb
deleted
100644 → 0
View file @
372fa75e
require
'test_helper'
class
IndustriesJobTest
<
ActiveSupport
::
TestCase
# test "the truth" do
# assert true
# end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment