我正在使用可确认的装置。我想给用户一个链接,以单击并重新发送确认电子邮件。问题是,当用户单击链接时,它不会转到设计 Controller 。 route.rb文件中缺少我什么?这是我的设置:
routes.rb
devise_for :users, :controllers => { :registrations => "registrations", :sessions => "sessions", :omniauth_callbacks => "authentications" }
user.rb
devise :omniauthable, :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
风景:
<a href="/users/confirmation/new" data-remote="true" data-method="post">Resend confirmation</a>
谢谢
最佳答案
如您在https://github.com/plataformatec/devise/blob/master/app/controllers/devise/confirmations_controller.rb#L2上看到的,用于确认#new的HTTP方法是GET,而不是POST。尝试删除'data-method =“post”'并查看其是否有效。
关于ruby-on-rails - 设计可确认的,如何在点击时重新发送确认电子邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9627564/