Class: MailForm::WarrantyFloorHeating

Inherits:
ContactForm
  • Object
show all
Includes:
MailForms::Homeowner, MailForms::Installer1, MailForms::Installer2
Defined in:
app/models/mail_form/warranty_floor_heating.rb

Overview

== Schema Information

Table name: contact_forms
Database name: primary

id :integer not null, primary key
object :jsonb
type :string(50) not null
created_at :datetime
updated_at :datetime
creator_id :integer
visit_id :integer

Indexes

index_contact_forms_on_visit_id (visit_id) WHERE (visit_id IS NOT NULL) USING hash

Foreign Keys

fk_rails_... (visit_id => visits.id) ON DELETE => nullify

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.control_typeObject



101
102
103
104
105
106
107
108
109
110
# File 'app/models/mail_form/warranty_floor_heating.rb', line 101

def self.control_type
  [
    "nSpire Touch WiFi Programmable Thermostat (UWG4-4999)",
    "nSpire Touch Programmable Thermostat (UDG4-4999)",
    "nHance Programmable Thermostat (UDG-4999)",
    "nTrust Nonprogrammable Thermostat (UTN4-4999)",
    "nJoy WiFi LED Touch Programmable Thermostat (UDG5-4999-WY)",
    "Other"
  ]
end

.experience_customer_supportObject



162
163
164
165
166
167
168
169
170
# File 'app/models/mail_form/warranty_floor_heating.rb', line 162

def self.experience_customer_support
  [
    "5 - Excellent",
    "4",
    "3 - Average",
    "2",
    "1 - Unsatisfactory"
  ]
end

.experience_information_providedObject



172
173
174
175
176
177
178
179
180
# File 'app/models/mail_form/warranty_floor_heating.rb', line 172

def self.experience_information_provided
  [
    "5 - Excellent",
    "4",
    "3 - Average",
    "2",
    "1 - Unsatisfactory"
  ]
end

.experience_installationObject



192
193
194
195
196
197
198
199
200
# File 'app/models/mail_form/warranty_floor_heating.rb', line 192

def self.experience_installation
  [
    "5 - Excellent",
    "4",
    "3 - Average",
    "2",
    "1 - Unsatisfactory"
  ]
end

.experience_shippingObject



182
183
184
185
186
187
188
189
190
# File 'app/models/mail_form/warranty_floor_heating.rb', line 182

def self.experience_shipping
  [
    "5 - Excellent",
    "4",
    "3 - Average",
    "2",
    "1 - Unsatisfactory"
  ]
end

.installation_typeObject



214
215
216
217
218
219
220
221
# File 'app/models/mail_form/warranty_floor_heating.rb', line 214

def self.installation_type
  [
    "TempZone™ for Tile, Stone and Hardwood",
    "Environ II™ for Carpet and Laminate ",
    "Slab Heating for Concrete Slab",
    "Other"
  ]
end

.installer_typeObject



223
224
225
226
227
228
229
230
# File 'app/models/mail_form/warranty_floor_heating.rb', line 223

def self.installer_type
  [
    "Floor Installer",
    "Contract/Builder",
    "Electrician",
    "Other"
  ]
end

.purchase_sourceObject



112
113
114
115
116
117
118
119
120
121
# File 'app/models/mail_form/warranty_floor_heating.rb', line 112

def self.purchase_source
  [
    "WarmlyYours",
    "Amazon",
    "Costco",
    "Home Depot",
    "Lowe's",
    "Other"
  ]
end

.roll_floor_typeObject



149
150
151
152
153
154
155
156
157
158
159
160
# File 'app/models/mail_form/warranty_floor_heating.rb', line 149

def self.roll_floor_type
  [
    "Tile",
    "Carpet",
    "Marble",
    "Hardwood",
    "Laminate",
    "Vinyl",
    "PVC",
    "Other",
  ]
end

.roll_room_typeObject



202
203
204
205
206
207
208
209
210
211
212
# File 'app/models/mail_form/warranty_floor_heating.rb', line 202

def self.roll_room_type
  [
    "Bathroom",
    "Kitchen",
    "Bedroom",
    "Basement",
    "Sunroom",
    "Living Room",
    "Other",
  ]
end

Instance Method Details

#email_addressObject



232
233
234
# File 'app/models/mail_form/warranty_floor_heating.rb', line 232

def email_address
  homeowner_email_address
end

#has_roll?(roll_number) ⇒ Boolean

Returns:

  • (Boolean)


240
241
242
243
244
245
246
247
# File 'app/models/mail_form/warranty_floor_heating.rb', line 240

def has_roll?(roll_number)
  send("roll_#{roll_number}_product_id").present? or
  send("roll_#{roll_number}_ohm_1").present? or
  send("roll_#{roll_number}_ohm_2").present? or
  send("roll_#{roll_number}_ohm_3").present? or
  send("roll_#{roll_number}_floor_type").present? or
  send("roll_#{roll_number}_room_type").present?
end

#toObject



236
237
238
# File 'app/models/mail_form/warranty_floor_heating.rb', line 236

def to
  "info@warmlyyours.com"
end