Module: ContactFormHelper

Defined in:
app/helpers/contact_form_helper.rb

Overview

View helper: contact form.

Instance Method Summary collapse

Instance Method Details

#decision_maker_select_optionsArray<Array<String>>

Returns decision maker select options.

Returns:

  • (Array<Array<String>>)

    decision maker select options



16
17
18
19
20
21
22
23
24
25
26
# File 'app/helpers/contact_form_helper.rb', line 16

def decision_maker_select_options
  %i[
    flooring_contractor
    electrical_contractor
    general_contractor
    architect_builder
    designer
    homeowner
    other
  ].map { |dm| [dm.to_s.titleize, dm.to_s] }
end

#purchasing_frequency_select_optionsHash{String => String}

Returns purchasing frequency options.

Returns:

  • (Hash{String => String})

    purchasing frequency options



5
6
7
8
9
10
11
12
13
# File 'app/helpers/contact_form_helper.rb', line 5

def purchasing_frequency_select_options
  {
    "Never" => 'Never',
    "1-2 per month" => '1-2-month',
    "3-5 per month" => '3-5-month',
    "6-10 per month" => '6-10-month',
    "10-month" => '10+ per month'
  }
end

#source_list_simple_select_optionsArray<Array<String>>

Returns lead source select options.

Returns:

  • (Array<Array<String>>)

    lead source select options



29
30
31
32
33
34
35
36
37
38
39
# File 'app/helpers/contact_form_helper.rb', line 29

def source_list_simple_select_options
  %i[
    referal_from_a_contractor
    referal_from_a_homeowner
    magazine_or_press
    internet_search
    internet_social
    internet_other_website
    other
  ].map { |dm| [dm.to_s.titleize, dm.to_s] }
end