I'd like to make the :confirm option in my link_to/button_to erb
elements conditional. So, if the page is in some state, no
confirmation is requested, but not otherwise, etc.
So far, my only (ugly) approach is to replace the linker html itself
depending on changes in state, but I believe there must be an easier
way to 'toggle' the confirmation option on/off.
Can anyone recommend an approach?