Sha256: 7b8ab351d53a09008edbb75c0f524227f0959321c0a0325d029a5db37c3d544f

Contents?: true

Size: 538 Bytes

Versions: 30

Compression:

Stored size: 538 Bytes

Contents

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

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

  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
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
e9_crm-0.1.13 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.12 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.11 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.10 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.8 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.7 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.6 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.5 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.4 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.1 app/helpers/e9_crm/contact_merges_helper.rb