Major features finished
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
class Report::ComparisonError < ApplicationRecord
|
||||
belongs_to :employer_card_comparison, optional: true
|
||||
belongs_to :member_card_comparison, optional: true
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
module Report
|
||||
class EmployerCardComparison < ApplicationRecord
|
||||
has_many :comparison_errors, dependent: :destroy
|
||||
accepts_nested_attributes_for :comparison_errors, allow_destroy: true, reject_if: :all_blank
|
||||
|
||||
has_many :member_card_comparisons
|
||||
has_many :member_comparison_errors, through: :member_card_comparisons, source: :comparison_errors
|
||||
|
||||
|
||||
def employer_total_errors
|
||||
self.comparison_errors.count + self.member_comparison_errors.count
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
module Report
|
||||
class MemberCardComparison < ApplicationRecord
|
||||
has_many :comparison_errors, dependent: :destroy
|
||||
accepts_nested_attributes_for :comparison_errors, allow_destroy: true, reject_if: :all_blank
|
||||
|
||||
belongs_to :employer_card_comparison, optional: true
|
||||
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,2 @@
|
||||
class Report::OldCardDuplicate < ApplicationRecord
|
||||
end
|
||||
Reference in New Issue
Block a user