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.

submit_tag :confirm bug

#660

When doing any of the following:

  submit_tag "Save", :onclick => "alert('x');", :confirmation => "Sure?"

  submit_tag "Save", :disable_with => "Saving...", :confirmation => "Sure?"

the confirmation isn't executed. This patch fixes that bug.

Reported by Lawrence Pit · July 19th, 2008 @ 06:54 AM

State: resolved
Milestone: 2.x
Assigned to: josh josh
Importance: none

Activity

  1. Clemens Kofler
    Clemens Kofler

    You should use :confirm and not :confirmation, otherwise you might confuse people (you confused me ;-)).

    As for the patch, this looks like a good idea to me. Is the "return true" really necessary?

    July 19th, 2008 @ 09:50 AM

  2. Lawrence Pit
    Lawrence Pit

    Ah yeah, sorry, the example in this ticket should indeed use :confirm. The patch is correct though. I like the return true to be explicit.

    July 19th, 2008 @ 11:42 AM

  3. Lawrence Pit
    Lawrence Pit
    • Title changed from submit_tag :confirmation bug to submit_tag :confirm bug

    July 21st, 2008 @ 02:43 AM

  4. josh
    josh
    • State changed from new to open

    I think ran into the same problem myself.

    October 28th, 2008 @ 04:29 PM

  5. Pratik
    Pratik
    • Assigned user set to josh

    March 6th, 2009 @ 05:56 PM

  6. Repository
    Repository
    • State changed from open to resolved

    (from [77f7d98e38dddf72890c80b4e4b2e088bb76d111]) submit_tag with confirmation and disable_with [#660 submit_tag :confirm bug state:resolved]

    Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

    March 7th, 2009 @ 07:33 PM