Do not call after sign in hook without resource, closes #1666.
This commit is contained in:
parent
b93288875f
commit
2f6ecc1328
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
devise (2.0.2)
|
||||
devise (2.0.4)
|
||||
bcrypt-ruby (~> 3.0)
|
||||
orm_adapter (~> 0.0.3)
|
||||
railties (~> 3.1)
|
||||
|
|
|
@ -89,8 +89,7 @@ MESSAGE
|
|||
warden.authenticated?(resource_name)
|
||||
end
|
||||
|
||||
if authenticated
|
||||
resource = warden.user(resource_name)
|
||||
if authenticated && resource = warden.user(resource_name)
|
||||
flash[:alert] = I18n.t("devise.failure.already_authenticated")
|
||||
redirect_to after_sign_in_path_for(resource)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue