ruby on rails - Devise confirmable, how to resend a confirmation email on click? -
i'm using devise confirmable. want give user link click , resend confirmation email. problem is, when user clicks link, isn't going devise controller. there i'm missing in routes.rb file? here setup:
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
the view:
<a href="/users/confirmation/new" data-remote="true" data-method="post">resend confirmation</a>
thanks
as see on https://github.com/plataformatec/devise/blob/master/app/controllers/devise/confirmations_controller.rb#l2, http method confirmation#new get, not post. try remove 'data-method="post"' , see if works.
Comments
Post a Comment