Files
baclight/app/models/card_exception.rb
T

11 lines
397 B
Ruby
Raw Normal View History

2026-03-03 22:53:21 -05:00
class CardException < ApplicationRecord
belongs_to :employer
has_many :card_exception_items
accepts_nested_attributes_for :card_exception_items, allow_destroy: true, reject_if: :all_blank
VALID_TYPES = ['zipcode', 'state', 'family_id']
validates :type, inclusion: { in: VALID_TYPES,
message: "%{value} is not a valid exception type" }
end