From 82598e75f84bae0f6b9bd77756deb83f30f5ec5c Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Tue, 15 Jul 2014 22:57:07 +1000 Subject: [PATCH] fix redirect after reset password bug --- app/controllers/passwords_controller.rb | 7 +++++++ config/routes.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 app/controllers/passwords_controller.rb diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb new file mode 100644 index 000000000..7a31ffddd --- /dev/null +++ b/app/controllers/passwords_controller.rb @@ -0,0 +1,7 @@ +class PasswordsController < Devise::PasswordsController + +protected + def after_resetting_password_path_for(resource) + root_path + end +end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 9f066fa47..360ed2477 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,7 +3,7 @@ Growstuff::Application.routes.draw do resources :plant_parts - devise_for :members, :controllers => { :registrations => "registrations" } + devise_for :members, :controllers => { :registrations => "registrations", :passwords => "passwords" } resources :members resources :photos