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
$.rails.confirm=function(message){returnprompt(message + " Type DELETE in the box below and click OK to proceed.").toLowerCase() === 'delete'};
But this changes the behaviour for every instance of data-confirm on the page. It'd be nice to have the element passed so that one could adjust the behaviour. In this case, this extra layer of hardness to delete something isn't necessary for some things.
Have I missed a way to do this? Is it accessible through the $.rails object?
The text was updated successfully, but these errors were encountered:
It seems strange to me that the triggering element isn't passed in the
$.rails.confirm
abstraction that was introduced here:8063d1d
Right now, I override it like so:
But this changes the behaviour for every instance of data-confirm on the page. It'd be nice to have the element passed so that one could adjust the behaviour. In this case, this extra layer of hardness to delete something isn't necessary for some things.
Have I missed a way to do this? Is it accessible through the
$.rails
object?The text was updated successfully, but these errors were encountered: