You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that after an Ajax request (create.wants.js / request.xhr?), when I refresh the page or go to another page, I see the flash message that was set by the action.
In my opinion, this is a bug. I don't think flash is ever used when responding to an Ajax request.
This fixes the problem for me:
--- a/vendor/plugins/resource_controller/lib/resource_controller/helpers/internal.rb
+++ b/vendor/plugins/resource_controller/lib/resource_controller/helpers/internal.rb
@@ -35,6 +35,7 @@ module ResourceController
# Sets the flash and flash_now for the action, if it is present.
#
def set_flash(action)
+ return if request.xhr?
set_normal_flash(action)
set_flash_now(action)
end
The text was updated successfully, but these errors were encountered:
I've noticed that after an Ajax request (create.wants.js / request.xhr?), when I refresh the page or go to another page, I see the flash message that was set by the action.
In my opinion, this is a bug. I don't think flash is ever used when responding to an Ajax request.
This fixes the problem for me:
The text was updated successfully, but these errors were encountered: