Flash messages with xhr no longer works in Rails 5.1.5 because of the following:
Like this page said:
As of Rails 5.1 and the new rails-ujs, the parameters data, status, xhr have been bundled into event.detail. For information about the previously used jquery-ujs in Rails 5 and earlier, read the jquery-ujs wiki.
I think the reason is that the following code no longer works (in Listener class):
constructor: (context) ->
@stack ?= new Stack()
@process_static(context)
($ context).on Growlyflash.Listener.EVENTS, (event, xhr) =>
if xhr ?= event.data?.xhr # now returns false
source = process_from_header(xhr.getResponseHeader(Growlyflash.Listener.HEADER))
@stack.push_only_fresh source
return
As a quick fix, I patch that method removing the test but I don't know if it could produce any side effect...
Hi,
Flash messages with xhr no longer works in Rails 5.1.5 because of the following:
Like this page said:
As of Rails 5.1 and the new rails-ujs, the parameters data, status, xhr have been bundled into event.detail. For information about the previously used jquery-ujs in Rails 5 and earlier, read the jquery-ujs wiki.
I think the reason is that the following code no longer works (in Listener class):
As a quick fix, I patch that method removing the test but I don't know if it could produce any side effect...