automate employer setup import from word and manual entry working

This commit is contained in:
Jason Jordan
2025-12-03 11:42:15 -05:00
parent 3fbece7da6
commit 78ce415b94
44 changed files with 1012 additions and 339 deletions
+17
View File
@@ -0,0 +1,17 @@
class Plan < ApplicationRecord
belongs_to :employer_setup_process
has_many :plan_benefits
after_create :create_default_benefits
private
def create_default_benefits
benefits = IdCardBenefitsTemplate.find_by(title: "BLANK").id_card_benefits.sort_by(&:sequence)
benefits.each do |ben|
plan_benefits.create(benefit_desc: ben.benefit_desc, sequence: ben.sequence)
end
end
end