我正在尝试将发送的设计电子邮件配置为对子域有效(默认情况下,所有链接都指向主域)。
我正在关注这个: https ://github.com/plataformatec/devise/wiki/How-To%3A-Send-emails-from-subdomains
问题是我收到了这个错误
NoMethodError in Devise/passwords#create
Showing /Users/user/Sites/site/app/views/devise/mailer/reset_password_instructions.html.haml where line #6 raised:
undefined method `subdomain' for #<User:0x007fb0019be868>
我subdomain
从视图中调用:
# app/views/devise/mailer/confirmation_instructions.html
%strong= link_to t('devise.confirmation_instructions.confirm_my_account'), confirmation_url(@resource, :confirmation_token => @resource.confirmation_token, :subdomain => @resource.subdomain)
运行 Rails 3.2.3,设计 1.8.6