Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

UJS-prototype: :confirm does not work on a button_to

#6669

This issue seems to stem from rails.js only checking for data-confirm on the element, and not on the button that is clicked.

Example code:
<%= button_to 'confirm', example_path, :confirm => 'Are you sure?'%>

Reported by Martin Troels "DarkFox" Eberhardt · April 4th, 2011 @ 11:47 AM

State: new
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Martin Troels "DarkFox" Eberhardt
    Martin Troels "DarkFox" Eberhardt

    This is in Rails 3.0.3 with the latest prototype-UJS from github, by the way.

    The action is in rails.js around 'document.on("submit"' and 'function allowAction(element)'

    April 4th, 2011 @ 11:56 AM