Employer form mostly working with persist to db

This commit is contained in:
Jason Jordan
2025-12-10 13:22:33 -05:00
parent 78ce415b94
commit 0464ba8929
68 changed files with 3071 additions and 365 deletions
+30 -18
View File
@@ -1,20 +1,32 @@
# frozen_string_literal: true
benefit_descriptions = ["Primary Visit",
"Specialist Visit",
"Urgent Care",
"INNInd Ded",
"INNFamily Ded",
"OONInd Ded",
"OONFamily Ded",
"Co-Insurance",
"INNInd OOP",
"INNFamily OOP",
"OONInd OOP",
"OONFamily OOP",
"Emergency Room",
"Preventive Care"]
default = IdCardBenefitsTemplate.create(title: "BLANK")
benefit_descriptions.each_with_index do |bene, i|
IdCardBenefit.create(sequence: i + 1, benefit_desc: bene, id_card_benefits_template: default)
end
temp_1 = IdCardBenefitsTemplate.create(title: "Rebekah's Template")
(1..14).each do |seq|
IdCardBenefit.create(sequence: seq, benefit: "greatest hits vol #{seq}", id_card_benefits_template: temp_1)
end
temp_2 = IdCardBenefitsTemplate.create(title: "Jason's Template")
(1..14).each do |seq|
IdCardBenefit.create(sequence: seq, benefit: "#{seq} hit wonder", id_card_benefits_template: temp_2)
end
# This file should ensure the existence of records required to run the application in every environment (production,
# development, test). The code here should be idempotent so that it can be executed at any point in every environment.
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
#
# Example:
#
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
# MovieGenre.find_or_create_by!(name: genre_name)
# end
# Pull one planid, return data, run this
# data.each do |bene|
# IdCardBenefit.create(
# benefit_desc: bene.benefit_desc,
# sequence: bene.sequence,
# id_card_benefits_template: temp
# )
# end