Verified Commit 58acfa96 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

fix missing class name in user relation

parent dea6b4a4
class SemesterProcessMail < ApplicationRecord
belongs_to :semester_process_volunteer
belongs_to :sent_by, references: :users, class_name: 'User', inverse_of: 'semester_process_mails'
belongs_to :sent_by, class_name: 'User', inverse_of: 'semester_process_mails'
enum kind: { mail: 0, reminder: 1 }
......
......@@ -8,7 +8,7 @@ class SemesterProcessVolunteer < ApplicationRecord
belongs_to :commited_by, -> { with_deleted }, class_name: 'User',
inverse_of: 'semester_processes', optional: true
has_many :semester_process_volunteer_missions, dependent: :destroy
has_many :semester_process_volunteer_mission, dependent: :destroy
has_many :semester_feedbacks, dependent: :destroy
has_many :hours, dependent: :nullify
......
......@@ -81,13 +81,15 @@ class User < ApplicationRecord
# Semester Process relations
#
has_many :semester_processes, inverse_of: 'creator', foreign_key: 'creator_id', dependent: :destroy
has_many :semester_processes, inverse_of: 'creator', foreign_key: 'creator_id',
class_name: 'SemesterProcess', dependent: :destroy
has_many :semester_process_mails_posted, inverse_of: 'mail_posted_by',
foreign_key: 'mail_posted_by_id', dependent: :nullify
class_name: 'SemesterProcess', foreign_key: 'mail_posted_by_id', dependent: :nullify
has_many :semester_process_reminder_mail_posted, inverse_of: 'reminder_mail_posted_by',
foreign_key: 'reminder_mail_posted_by_id', dependent: :nullify
class_name: 'SemesterProcess', foreign_key: 'reminder_mail_posted_by_id', dependent: :nullify
has_many :semester_process_mails, dependent: :nullify
has_many :semester_process_mails, class_name: 'SemesterProcessMail', foreign_key: 'sent_by_id',
inverse_of: 'sent_by', dependent: :nullify
has_many :semester_process_reminders, -> { reminder }, through: :semester_process_mails
has_many :semester_process_responsibilities, inverse_of: 'responsible',
......
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