Rails: Use a custom URL for password reset with Devise

Viewed 274

I am using Devise for authentication in my Rails app. The password management including reset password mailers, etc. is handled via a controller that derives from Devise::PasswordsController. Something like:

class Users::PasswordsController < Devise::PasswordsController
  def new
    if not set_actionmailer_settings
      error = I18n.t('invalid_paswd_config')
      redirect_to new_user_session_path, 
                  :flash => { :error => error } and return
    end

    super
  end
end

I have now moved to a new UI that does not use Rails UI. Instead it calls into the Rails APIs. In the email that is sent to the user for resetting password, if I want to use a use a custom password reset URL, how do I do it?

1 Answers
Related