stable, before a refactor
This commit is contained in:
@@ -22,6 +22,9 @@ class Employer < ApplicationRecord
|
||||
belongs_to :card_provider, optional: true
|
||||
belongs_to :card_rx, optional: true
|
||||
|
||||
has_many :card_exceptions, dependent: :destroy
|
||||
accepts_nested_attributes_for :card_exceptions, allow_destroy: true, reject_if: :all_blank
|
||||
|
||||
scope :active, -> { where(active: true) }
|
||||
scope :inactive, -> { where(active: false) }
|
||||
|
||||
@@ -128,7 +131,7 @@ class Employer < ApplicationRecord
|
||||
self.plans.each_with_index do |plan, i|
|
||||
plan.plan_benefits.each do |bene|
|
||||
Vhcs::HlEgglestonCardBenefit.create!(
|
||||
plan_id: plan.plan_id,
|
||||
plan_id: plan.pb_product_key,
|
||||
benefit_desc: bene.benefit_desc,
|
||||
benefit: bene.benefit,
|
||||
sequence: bene.sequence,
|
||||
|
||||
Reference in New Issue
Block a user