How do I configure the hostname for Rails ActionMailer?

前端 未结 7 1334
日久生厌
日久生厌 2020-12-29 06:05

I\'m working on a fairly traditional forgot password email - I want to email the user a password change token embedded in a link that they can click on in order to change th

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 06:45

    Setting default_url_options directly is deprecated in Rails 3.1

    Use the url_for helper to create it:

    <%= link_to "click here", url_for(:controller => foo, :action => 'bar', :token => token, :host => 'www.yourdomain.com') %>
    

提交回复
热议问题