Clarify what needs to be required first
tmaier opened this issue · comments
You mention to add require unobtrusive_flash
and require unobtrusive_flash_bootstrap
to application.js
.
This is right in general.
But it took me a while to understand that order matters. require unobtrusive_flash
must be after all functions which want to bind to this event.
require unobtrusive_flash_bootstrap
require unobtrusive_flash
Could you update to v3.0.0 and check if the documented load order works? I delayed the firing of flash rendering, so the script should have time to bind.
The right order is as of v3.0.0
//= require unobtrusive_flash
//= require unobtrusive_flash_bootstrap
This looks more logical. Thank you.