Forum: Ruby on Rails Adding the attribute ID to HTML Element <a>

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
J. m. (Guest)
on 2007-02-20 02:08

How can I add the attribute id to <a> element when using link_to_remote?

Here what I'm doing:
      :url =>{:controller =>:header, :action=>:hide_tag_cloud});

This produces an HTML like

<a href="#" onclick="new Ajax.Updater('tag_cloud_header',
'/header/hide_tag_cloud', {asynchronous:true, evalScripts:true}); return

But I need to put the id in the rendered code like

<a href="#" id="someId" onclick="new Ajax.Updater('tag_cloud_header',

Wes G. (Guest)
on 2007-02-20 03:16
J. mp wrote:

       :url =>{:controller =>:header, :action=>:hide_tag_cloud},
       :id => "someId"
 should work.
This topic is locked and can not be replied to.