# Rails 3 e ajax

**URL:** <https://www.ruby-forum.com/t/rails-3-e-ajax/201489>\
**Category:** IT\
**Created:** [January 8, 2011, 5:19pm UTC](https://www.ruby-forum.com/t/rails-3-e-ajax/201489 "2011-01-08T17:19:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 8, 2011, 5:19pm UTC](https://www.ruby-forum.com/t/rails-3-e-ajax/201489/1 "2011-01-08T17:19:16Z")

</div>

sto’ migrando una applicazione da rails 2 a rails 3  
non avendo piu’ link\_to\_remote come faccio a migrare questo codice

\<%=link\_to\_remote image\_tag(“user-trash.png”,:border=\>“0”),  
:url=\>{:action=\>“delete”,:id=\>chi.id},  
:html=\>{:title=\>"elimina "},  
:complete=\>“Modalbox.show(request.responseText,{title:‘tecnici’})”%\>

ho usato link\_to col parametro :remote=\>true ma non so come ottenere  
il valore responseText

\<%=link\_to image\_tag(“user-trash.png”,:border=\>“0”),  
{:controller =\> “tecnico”,  
:action=\>“delete”,:id=\>chi.id}, :id=\>chi.id,  
:remote=\>true %\>

\<%= javascript\_tag do %\>  
Event.observe(’\<%=chi.id%\>’, ‘ajax:complete’, function(event)  
{  
alert(“ok”);  
});  
\<% end %\>

Grazie Alessandro Batisti
