DB restructure, print page

This commit is contained in:
Jason Jordan
2026-03-13 08:47:13 -04:00
parent 6a068243f4
commit 8c885b3e76
73 changed files with 1362 additions and 325 deletions
+35
View File
@@ -0,0 +1,35 @@
module IdCard
class FieldException < ApplicationRecord
belongs_to :configuration
has_many :field_exception_items, dependent: :destroy
accepts_nested_attributes_for :field_exception_items, allow_destroy: true, reject_if: :all_blank
VALID_TYPES = ['zipcode', 'state', 'family_id']
validates :exception_type, inclusion: { in: VALID_TYPES,
message: "%{value} is not a valid exception type" }
class << self
def permitted_params(params)
params.require(:id_card_configuration).permit(
field_exceptions_attributes: [
:exception_type,
:exception_value,
:_destroy,
field_exception_items_attributes: [
:field_name,
:field_value,
:network_logo_id,
:provider_section_id,
:_destroy
]
]
)
end
end
end
end