1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Tidy up previous commit.

This commit is contained in:
José Valim 2010-05-24 22:50:25 +02:00
parent 80977c6dee
commit d98882d745
2 changed files with 2 additions and 6 deletions

View file

@ -31,8 +31,7 @@ class Devise::RegistrationsController < ApplicationController
def update
if resource.update_with_password(params[resource_name])
set_flash_message :notice, :updated
#redirect_to after_sign_in_path_for(self.resource)
redirect_to after_update_path_for(self.resource)
redirect_to after_update_path_for(resource)
else
clean_up_passwords(resource)
render_with_scope :edit

View file

@ -128,11 +128,8 @@ module Devise
# end
# end
#
def after_update_path_for(resource_or_scope)
scope = Devise::Mapping.find_scope!(resource_or_scope)
home_path = :"#{scope}_root_path"
respond_to?(home_path, true) ? send(home_path) : root_path
after_sign_in_path_for(resource_or_scope)
end
# Method used by sessions controller to sign out an user. You can overwrite