:confirm not working in my button_to

I wrote in my view : (haml)

= button_to I18n.t(:cancel_my_account),
user_registration_path(resource), :confirm =>
I18n.t(:are_you_sure), :method => :delete, :title
=>I18n.t(:cancel_my_account)

which generates the html code :

but the confirm panel doesn’t show up… it goes directly to the
delete action … any clue ?

thanks fyh.

note : I have the csrf tags in my

On 5 December 2010 22:59, Erwin [email protected] wrote:

but the confirm panel doesn’t show up… it goes directly to the
delete action … any clue ?

Are you including the javascript libraries? In your layout you should
have something like
javascript_include_tag :defaults
Check in the htlm to make sure the libraries are there.

If you have then have you got javascript enabled in your browser?

If yes then check the html for validity by copying the complete page
html and pasting into the w3c html vallidator. In fact this is a good
idea even you have fixed the problem by one of the above.

Check for javascript bugs by loading the page with firebug addon
enabled in firefox.

Colin