Link_to_remote with :confirm...need syntax help

What is the syntax to use :confirm with link_to_remote? This doesn’t
work, I’ve tried a few permutations, with no success:

  <%= link_to_remote( "X",
       :update => 'address_list',
       :url => { :controller => 'addresses', :action =>

‘destroy’, :id => address },
:confirm => true ) %>

The above works fine if I remove the :confirm part.

On May 14, 2007, at 10:30 PM, Rick S. wrote:

What is the syntax to use :confirm with link_to_remote? This doesn’t
work, I’ve tried a few permutations, with no success:

  <%= link_to_remote( "X",
       :update => 'address_list',
       :url => { :controller => 'addresses', :action =>

‘destroy’, :id => address },
:confirm => true ) %>

The above works fine if I remove the :confirm part.

Try:

:confirm => “Should I really destroy the address #{address}?”

The value is a string that will be shown in an alert box.

-Rob

Rob B. http://agileconsultingllc.com
[email protected]