Sunday, 15 April 2012

ruby on rails - Authenticity Token in email body -



ruby on rails - Authenticity Token in email body -

i have rails application , have button lets user send email using mailto.

here code:

<%= button_to('e-mail us', href="mailto:<email address>?subject=private lessons", :class => 'btn btn-large btn-success') %>

it's working fine, when email opens, body of email has in body of email.

authenticity_token=8wk4ulawh4medtq7fwzw0yrylcjtnpjnp040atdfnxa%3d

i don't need in email. can have not appear?

thanks

you utilize mail_to helper method instead:

<%= mail_to "test@test.com","email-us", :subject => "private lessons" %>

you can find more examples here: http://api.rubyonrails.org/classes/actionview/helpers/urlhelper.html#method-i-mail_to

regards,

-fernando

ruby-on-rails ruby

No comments:

Post a Comment