Link in mails

Hi,

  I am using the activeMailer. Wich is the best way to add links to
actions in my RoR app into the mail content? I didn't get link-to to
work.

Thanks

<%= link_to "Register", :controller=>"account", :action=>"register" %>

use link_to not link-to

Hi Valehru,

  Didn't work, got the following error

undefined method `url_for' for #<Notifier:0x44b11cc>

Thanks
Ricardo

Don’t do either. Pass your url in from the controller. Only the controller will have the proper context for the URL helpers to evaluate a correct path. So, for example:

Notifier.deliver_thank_you(url_for(:controller => ‘user’, :action => ‘thanks_for_signing_up’))