Major features finished
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
class Member < ApplicationRecord
|
||||
include MemberAutomation
|
||||
belongs_to :id_card_plan, class_name: 'IdCard::Plan', optional: true
|
||||
belongs_to :employer
|
||||
|
||||
serialize :dependents, coder: JSON
|
||||
before_validation :format_dependents, if: :dependents_changed?
|
||||
|
||||
def id_card_field_exception_values
|
||||
address = Vhcs::PbEntityAddress.find_by(pb_entity_key: self.pb_entity_key)
|
||||
{
|
||||
@@ -11,6 +15,14 @@ class Member < ApplicationRecord
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def format_dependents
|
||||
if self.dependents.is_a?(String)
|
||||
self.dependents = self.dependents.split(",").map(&:strip)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user