fix broken trough relation from missions to reminder_mailing

parent 66dad167
......@@ -17,6 +17,9 @@ class Assignment < ApplicationRecord
has_many :semester_process_volunteers, through: :semester_process_volunteer_missions
has_many :semester_processes, through: :semester_process_volunteers
has_many :reminder_mailing_volunteers, as: :reminder_mailable, dependent: :destroy
has_many :reminder_mailings, through: :reminder_mailing_volunteers
validates :client_id, uniqueness: {
scope: :volunteer_id, message: I18n.t('assignment_exists')
}
......
......@@ -8,9 +8,6 @@ module GroupAssignmentAndAssignmentCommon
belongs_to :volunteer
accepts_nested_attributes_for :volunteer, update_only: true
has_many :reminder_mailing_volunteers, as: :reminder_mailable, dependent: :destroy
has_many :reminder_mailings, through: :reminder_mailing_volunteers
has_one :trial_period, as: :trial_period_mission, inverse_of: :trial_period_mission
accepts_nested_attributes_for :trial_period
......
......@@ -8,6 +8,9 @@ class GroupAssignment < ApplicationRecord
has_many :group_assignment_logs, dependent: :nullify
has_many :hours, ->(object) { where(volunteer: object.volunteer) }, through: :group_offer
has_many :reminder_mailing_volunteers, as: :reminder_mailable, dependent: :destroy
has_many :reminder_mailings, through: :reminder_mailing_volunteers
delegate :title, to: :group_offer
validates :volunteer, uniqueness: {
......
......@@ -174,7 +174,7 @@ class DepartmentManagerTest < ApplicationSystemTestCase
click_link 'Filter aufheben'
GroupAssignment.ended.each do |assignment|
assert page.has_css? "tr##{dom_id assignment}"
assert page.has_css? "tr##{dom_id(assignment)}"
end
assert page.has_link? 'Anzeigen'
......
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