Rails turbolinks 5 flash messages
问题 I am trying to find a way to deal with rails (v4.1) flash messages when using turbolinks 5. I tried adding data-temporary="true" to each flash message div and then something like: $(document).on('turbolinks:before-cache', function () { $('[data-temporary]').remove(); }); so old flash messages aren't cached and won't be shown the next time the user accesses that same page. However, that has left me with an issue on pages where I'm using flash.now because on these pages the flash has been