mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
SessionsController#destroy
no longer yields the resource object.
If you need access to the current resource when overring the action use the scope helper (like `current_user`) before calling `super`. Closes #2926.
This commit is contained in:
parent
755219ccfc
commit
1eab594895
2 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,11 @@
|
|||
### Unreleased
|
||||
|
||||
* fixes
|
||||
* `SessionsController#destroy` no longer yields the `resource` to receiving block,
|
||||
since the resource isn't loaded in the action. If you need access to the current
|
||||
resource when overring the action use the scope helper (like `current_user`) before
|
||||
calling `super`.
|
||||
|
||||
### 3.2.4
|
||||
|
||||
* enchancements
|
||||
|
|
|
@ -24,7 +24,7 @@ class Devise::SessionsController < DeviseController
|
|||
redirect_path = after_sign_out_path_for(resource_name)
|
||||
signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
|
||||
set_flash_message :notice, :signed_out if signed_out && is_flashing_format?
|
||||
yield resource if block_given?
|
||||
yield if block_given?
|
||||
|
||||
# We actually need to hardcode this as Rails default responder doesn't
|
||||
# support returning empty response on GET request
|
||||
|
|
Loading…
Add table
Reference in a new issue