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.34 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.33 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.32 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.31 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.30 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.29 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.28 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.27 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.26 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.25 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.24 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.23 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.22 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.21 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.20 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.19 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.18 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.17 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.16 app/helpers/e9_crm/contact_merges_helper.rb
e9_crm-0.1.14 app/helpers/e9_crm/contact_merges_helper.rb