1
我想配置设计邮件发送有效的子域(默认情况下所有链接指向主域)。发送电子邮件从子域上设计不工作
我跟随这名: 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)
的运转轨道3.2.3,设计1.8.6
你是怎么调用'subdomain'?该错误表明你将它作为一个'User'对象的实例方法调用,这将是不正确的。 – x1a4
请检查更新后的问题。 – Martin