mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Now hooks ActionController::Flash#redirect_to so that flash messages work with redirect_to
This commit is contained in:
parent
f5b45c1497
commit
876040afcb
1 changed files with 16 additions and 16 deletions
|
@ -1,16 +1,16 @@
|
|||
module Paloma
|
||||
|
||||
# TODO explain!
|
||||
module ::ActionController::Redirecting
|
||||
module ::ActionController::Flash
|
||||
alias_method :original_redirect_to, :redirect_to
|
||||
end
|
||||
|
||||
|
||||
|
||||
module ActionControllerExtension
|
||||
def redirect_js_hook options = {}, response_status = {}
|
||||
def redirect_js_hook options = {}, response_status_and_flash = {}
|
||||
add_to_callbacks @__paloma_callback__
|
||||
original_redirect_to options, response_status
|
||||
original_redirect_to options, response_status_and_flash
|
||||
end
|
||||
alias_method :redirect_to, :redirect_js_hook
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue