Ok, so after fighting this for a while, I decided to read the explanation at the top of this file:
https://github.com/plataformatec/devise/blob/master/lib/devise/controllers/url_helpers.rb
It turns out that Devise generates by default (at least in my application) - these are routes. confirmation_urlis an assistant, but you can still see the routes that Devise generates:
rake routes | grep confirm
Since I use a model called Accountinstead User, this gives me the following:
account_confirmation POST /accounts/confirmation(.:format) accounts/confirmations
new_account_confirmation GET /accounts/confirmation/new(.:format) accounts/confirmations
GET /accounts/confirmation(.:format) accounts/confirmations
confirm_account PATCH /accounts/confirmation(.:format) accounts/confirmations
, , :
http:
- GET. - , POST ; account_confirmation. URL- rails URL-:
Rails.application
.routes.url_helpers
.account_confirmation_url(confirmation_token: account.confirmation_token)
URL-, . Account User Devise.