【问题标题】:confirmation_url devise not full pathConfirmation_url 设计不是完整路径
【发布时间】:2013-11-27 10:23:31
【问题描述】:

我尝试发送带有设计确认的电子邮件,但是当电子邮件发送...激活帐户的 URL 没有完整路径

我的链接设计

<%= link_to 'Confirm my account', confirmation_url(@user, :confirmation_token => @user.confirmation_token, :host => PATH_URL) %>

我得到这样的链接:

http://localhost:3000/users/confirmation

没有这样的完整路径

http://localhost:3000/users/confirmation?confirmation_token=wtng27FeiWooMGHSEL57

【问题讨论】:

    标签: ruby-on-rails devise-confirmable


    【解决方案1】:

    最近设计更改了需要引用令牌的方式,所以现在字符串为:

     <%= link_to 'Confirm my account', confirmation_url(@user, :confirmation_token => @token, :host => PATH_URL) %>
    

    这应该可行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-16
      • 2022-12-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多