Skip to content

Instantly share code, notes, and snippets.

@foxweb
Created March 9, 2011 14:54
Show Gist options
  • Select an option

  • Save foxweb/862319 to your computer and use it in GitHub Desktop.

Select an option

Save foxweb/862319 to your computer and use it in GitHub Desktop.
def feedback_mobile
# if params[:context]
# cruise = Cruise.find(params[:context].to_i) rescue nil
# if cruise
# params[:mail_to] = cruise.manager_mail
# params[:mail_to] = cruise.ship.company.manager_mail unless cruise.manager_mail and cruise.manager_mail != ''
# end
# end
params[:mail_to] = 'a.kurepin@gmail.com'
params[:url] = 'http://cruiz.ru/cruises/' + params[:context].to_s
email = ApplicationMailer.create_feedback(params)
email.set_content_type("text/html; charset=utf-8")
if ApplicationMailer.deliver(email)
render :layout => false, :text => 'true'
else
render :layout => false, :text => 'false'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment