Reputation: 2390
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?
Upvotes: 2
Views: 352
Reputation: 6121
try this in your routes.rb
map.devise_for :users, controllers: {passwords: "users/passwords"}, path_names: {
new: :new
}
Upvotes: 1