docbrown/app/controllers/passwords_controller.rb
Anna Buianova 455399bdba
Rubocop fixes (#18461)
* Rubocop fixes

* Fixed most Capybara/SpecificMatcher violations

* Moved flash notice texts to locales
2022-09-16 15:25:48 +03:00

16 lines
429 B
Ruby

class PasswordsController < Devise::PasswordsController
# allow already signed in users to reset their password
skip_before_action :require_no_authentication
def new
super
session[:referrer] = request.referer
end
protected
def after_sending_reset_password_instructions_path_for(_resource_name)
flash[:global_notice] = I18n.t("devise.passwords.reset_instructions_sent")
session[:referrer]
end
end