Link_to_remote, how to specify an html id= ? what's wrong?

I wrote the following, but no id appears in the html output, what’s
wrong ?
<%= link_to_remote(“Toggle View”, :url => {:action => ‘toggleview’},
:html => {:id => ‘toggle_display’}) %>

thanks

<%= link_to_remote(“Toggle View”, :url => {:action => ‘toggleview’},
:html => {:id => ‘toggle_display’}) %>

html_options must be passed as the third parameter of type hash (here
you
pass one string, then one hash)

try : link_to_remote(“Toggle View”, { :url => {:action => ‘toggleview’}
},
{:id => ‘toggle_display’})

cheers

Thibaut

Thibaut Barrère wrote:

<%= link_to_remote(“Toggle View”, :url => {:action => ‘toggleview’},
:html => {:id => ‘toggle_display’}) %>

html_options must be passed as the third parameter of type hash (here
you
pass one string, then one hash)

try : link_to_remote(“Toggle View”, { :url => {:action => ‘toggleview’}
},
{:id => ‘toggle_display’})

cheers

Thibaut

GOT IT… ! thanks

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs