Fixed User relation to Job
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
class User < ApplicationRecord
|
class User < ApplicationRecord
|
||||||
has_many :jobs, foreign_key: :costumer_id
|
has_many :jobs_as_costumer, foreign_key: :costumer_id, class_name: 'Job'
|
||||||
|
has_many :jobs_as_operator, foreign_key: :operator_id, class_name: 'Job'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user