components/financial_assistance/app/models/financial_assistance/application.rb
# Creates both relationships A to B, and B to A.
# This way we do not have to call two methods to create relationships
Creates both relationships A to B, and B to A.
This way we do not have to call two methods to create relationships
Creates both relationships A to B and B to A . This way we do not have to call two methods to create relationships
def add_or_update_relationships(applicant, applicant2, relation_kind)
      update_or_build_relationship(applicant, applicant2, relation_kind)
      inverse_relationship_kind = ::FinancialAssistance::Relationship::INVERSE_MAP[relation_kind]
      update_or_build_relationship(applicant2, applicant, inverse_relationship_kind) if inverse_relationship_kind.present?
    end
def add_or_update_relationships ( applicant , applicant2 , relation_kind ) update_or_build_relationship ( applicant , applicant2 , relation_kind ) inverse_relationship_kind = :: FinancialAssistance :: Relationship :: INVERSE_MAP [ relation_kind ] update_or_build_relationship ( applicant2 , applicant , inverse_relationship_kind ) if inverse_relationship_kind . present? end
Creates both relationships A to B, and B to A.
Creates both relationships A to B and B to A .
applicant
applicant2
relation_kind