How to pull a parameter into a string in rails

ERROR: syntax error, unexpected tIDENTIFIER, expecting ‘)’ …endMail?email_to=#{‘appointment.email’} syntax error, unexpected ‘)’, expecting keyword_end …check+the+website+for+details’).read … ^ I want to pull a parameter into a string in Rails.

require ‘open-uri’
response = open(‘http://mqttxy.mybluemix.net/sendMail?email_to=#
{’@appointment.email’}&from=abc@gmail.com&subject=New+Appointment&message
=Please+check+the+website+for+details’).read

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.