Ajax.Updater more options than link_to in Rails 3 ?

Hello,

I would like to update a partial on the screen, by hovering over a
'<div>' element, between the <div>'s there are several statements both
in HTML as in Rails..

In Rails 2, one could write :

<a href="#" onmouseover="new Ajax.Updater('comment',/view/comment/'+<%=
projectstep.id.to_s+"" %>), {asynchronous:true, evalScript:true});
return false;">
Here plenty of statements including <% if condition %> etc..
</a>

In Rails 3, I could only find :

link_to(body, url, html_options = {})
or
<%= link_to image_tag("delete.png"), { :controller => 'products',
:action => 'destroy', :id => product }, :method => :delete, :confirm =>
"Are you sure?", :remote => true %>

Is there a way to have the same option as in Rails 2 ??

Hello,

I would like to update a partial on the screen, by hovering over a

’ element, between the
's there are several statements both

in HTML as in Rails…

In Rails 2, one could write :

<a href="#" onmouseover="new Ajax.Updater(‘comment’,/view/comment/’+<%=

projectstep.id.to_s+"" %>), {asynchronous:true, evalScript:true});

return false;">

Here plenty of statements including <% if condition %> etc…

In Rails 3, I could only find :

link_to(body, url, html_options = {})

you can still pass

onmouseover=“new Ajax.Updater(‘comment’,/view/comment/’+<%=projectstep.id.to_s+”" %>), {asynchronous:true, evalScript:true});return false;"

to the html_options hash above but that would be obstrusive js.

or

<%= link_to image_tag(“delete.png”), { :controller => ‘products’,

:action => ‘destroy’, :id => product }, :method => :delete, :confirm =>

“Are you sure?”, :remote => true %>

Using jquery, just bind a onmouseover event to the div you want, and use ajax to update.

I believe this is the accepted practice.

Thank you very much !

Will try to implement it with jQuery..