Module: E9Crm::ContactMergesHelper

Defined in:
app/helpers/e9_crm/contact_merges_helper.rb

Instance Method Summary collapse

Instance Method Details

#contact_a(field_name) ⇒ Object



2
3
4
5
# File 'app/helpers/e9_crm/contact_merges_helper.rb', line 2

def contact_a(field_name)
  @_contact_a_vals ||= {}
  @_contact_a_vals[field_name] ||= merge_contact_val(@contact_a, field_name)
end

#contact_b(field_name) ⇒ Object



7
8
9
10
# File 'app/helpers/e9_crm/contact_merges_helper.rb', line 7

def contact_b(field_name)
  @_contact_b_vals ||= {}
  @_contact_b_vals[field_name] ||= merge_contact_val(@contact_b, field_name)
end

#merge_contact_val(obj, field_name) ⇒ Object



12
13
14
15
16
# File 'app/helpers/e9_crm/contact_merges_helper.rb', line 12

def merge_contact_val(obj, field_name)
  # return '' here rather than nil so inputs will have a value, otherwise checked
  # with no value ends up being interpreted as "on"
  obj.send(field_name) || ''
end