2026-03-06 10:56:20 -05:00
|
|
|
module IdCard
|
|
|
|
|
class Setup < ApplicationRecord
|
|
|
|
|
belongs_to :employer, class_name: 'Employer'
|
|
|
|
|
belongs_to :employer_logo, optional: true
|
|
|
|
|
belongs_to :network_logo, optional: true
|
|
|
|
|
belongs_to :provider_section, optional: true
|
|
|
|
|
belongs_to :rx_section, optional: true
|
2026-03-05 11:30:24 -05:00
|
|
|
|
2026-03-06 10:56:20 -05:00
|
|
|
has_many :plans, dependent: :destroy
|
2026-03-05 11:30:24 -05:00
|
|
|
|
2026-03-06 10:56:20 -05:00
|
|
|
has_many :exceptions, dependent: :destroy
|
2026-03-05 11:30:24 -05:00
|
|
|
|
2026-03-06 10:56:20 -05:00
|
|
|
# def employer_logo_filename
|
|
|
|
|
# self.employer_logo.filename
|
|
|
|
|
# end
|
2026-03-05 11:30:24 -05:00
|
|
|
|
2026-03-06 10:56:20 -05:00
|
|
|
# def network_logo_filename
|
|
|
|
|
# self.network_logo.filename
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
|
def self.permitted_params(params)
|
|
|
|
|
params.require(:id_card_setup).permit(
|
|
|
|
|
:print_name,
|
|
|
|
|
:network_provider,
|
|
|
|
|
:card_template,
|
|
|
|
|
:rx_group_number,
|
|
|
|
|
:id_card_employer_logo_id
|
|
|
|
|
)
|
|
|
|
|
end
|
2026-03-05 11:30:24 -05:00
|
|
|
end
|
|
|
|
|
end
|