This project is archived and is in readonly mode.

#2347 ✓invalid

Patch that adds an exception

Reported by nasmorn | March 26th, 2009 @ 01:34 PM | in 3.x

<%= link_to 'bla', '#', {:onclick => "document.merge_form.submit()", :confirm => "Really?"}%>

will result in

<a onclick="return confirm('Really?');" href="#">bla</a>

with my onclick just eaten without any notice. If this isn't done for a specific reason I would propose 2 possible solutions. Allow only one of the two being set and throw an exception Wrap the onclick JS in the confirm

I totally understand that I will have to write the patch myself and just wanted to check if this is not for some reason intended behaviour, if it is I could add a comment on this to the link_to method.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>