I'm using Devise confirmable. I'm having an issue whereby if the user clicks on the confirmation link more than once (i.e. if the user forgot they already confirmed or whatever) they get a nasty error:
NoMethodError at /confirmation
undefined method `new_user_registration_path' for <ActionDispatch::Routing::RoutesProxy:0x007fe739a40510>
This is the confirmation link:
<%= link_to 'Confirm my account', confirmation_url(@user, host: @host, confirmation_token: @user.confirmation_token) %>
Ideal behavior would flash[:alert] = "You've already confirmed" + a redirect to login page.
I tried creating my own confirmations_controller.rb
and messing with the routes, but did not have any success.
Thanks in advance for any assistance!