Skip to content

Instantly share code, notes, and snippets.

@staycreativedesign
Created November 30, 2017 05:01
Show Gist options
  • Save staycreativedesign/b345aac43ab0bd57f47c2f8b00ac174c to your computer and use it in GitHub Desktop.
Save staycreativedesign/b345aac43ab0bd57f47c2f8b00ac174c to your computer and use it in GitHub Desktop.
NoMethodError at /dealers
undefined method `[]' for nil:NilClass
file: main.rb location: block in <top (required)> line: 51
:attachments => {params[:file][:filename] => File.read(params[:file][:tempfile])},
Pony.mail({
:to => 'gustavoanalytics@gmail.com',
:subject => "DEALER " + params[:name] + " has contacted you via the Fusion Marketing website",
:html_body =>
"<br><br><strong>Package:</strong> #{params[:package]}" +
"<br><br>Dealer Name: #{params[:name]}" +
"<br><br>Dealer Email: #{params[:email]}" +
"<br><br>Dealer Phone: #{params[:phone]}" +
"<br><hr>" +
"<br><br>Company Name: #{params[:company_name]}" +
"<br><br>Company Phone: #{params[:company_phone]}" +
"<br><br>Company Website: #{params[:company_website]}" +
"<br><br>Company Address: #{params[:company_address]}" +
"<br><br>Company Billing: #{params[:company_billing]}" +
"<br><br>Company List cities/area you conduct business in: #{params[:company_business]}" +
"<br><br>Company Colors: #{params[:company_colors]}" +
"<br><br>Company Started: #{params[:company_year]}" +
"<br><br>Company Target Audience: #{params[:company_target]}" +
"<br><br>Company Acquisition Methods: #{params[:company_acquisition]}" +
"<br><br>Company Slogan: #{params[:company_tag]}" +
"<br><br>Company Testimonials: #{params[:company_testimonial]}" +
"<br><hr>" +
"<br><br>Company Distributor ID: #{params[:company_distributor]}" +
"<br><br>Company P10 ID: #{params[:company_p10]}" +
"<br><br>Company ViaSat ID: #{params[:company_viasat]}",
:attachments => {params[:file][:filename] => File.read(params[:file][:tempfile])},
:via => :smtp,
:via_options => {
:address => 'smtp.gmail.com',
:port => '587',
:enable_starttls_auto => true,
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment