I am getting confused on how to do this. I want to send a link in an
email that they can click on. I am confused on whther to use link_to
vs url_for. I would also like to pass in a addional param in the
link.
Link_to only generates text not a link.
This the definition in the model ActionMailer.
def emailactivate(reminderinfo)
recipients reminderinfo.email
subject "Activation Link for your DrugBin Reminders"
body :reminderinfo => reminderinfo
content_type "text/html"
end
emailactivate.rhtml (is there a difference in putting this as a
emailactivate.html.erb)
<%= url_for(:host => APP_CONFIG['settings']['domain'], :controller =>
'/user/dashboard', :action => 'activateemail', :id =>
@reminderinfo.id, :code => @reminderinfo.confirmation ) %>.
<%= link_to "Confurm", :controller => '/user/dashboard', :action =>
'activateemail', :id => @reminderinfo.id, :code =>
@reminderinfo.confirmation %>.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---