Employer table broken up and new idcard module setup
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
class IdCard::Exception < ApplicationRecord
|
||||
belongs_to :id_card_setup
|
||||
has_many :id_card_exception_items
|
||||
accepts_nested_attributes_for :id_card_exception_items, allow_destroy: true, reject_if: :all_blank
|
||||
module IdCard
|
||||
class Exception < ApplicationRecord
|
||||
belongs_to :setup
|
||||
has_many :exception_items
|
||||
accepts_nested_attributes_for :exception_items, allow_destroy: true, reject_if: :all_blank
|
||||
|
||||
VALID_TYPES = ['zipcode', 'state', 'family_id']
|
||||
VALID_TYPES = ['zipcode', 'state', 'family_id']
|
||||
|
||||
validates :type, inclusion: { in: VALID_TYPES,
|
||||
message: "%{value} is not a valid exception type" }
|
||||
validates :type, inclusion: { in: VALID_TYPES,
|
||||
message: "%{value} is not a valid exception type" }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user