How to use Ajax with rails ?

Hi all,

Can any one tell me how to use Ajax with Rails.

Send me quick start up link and videos.



Fahim Babar PAtel

Try Google. :slight_smile:,mod=0&sourceid=chrome&ie=UTF-8

Include jquery-rails and do it like you normally would.

Ajax is the default functionality from rail no need of extra packages, ensure following things you have included
1)ensure rails.js in public/javascripts files if, you are using < 3.0. if, you are using >3.0 then auto metically it will includes in application.js(manifest file)
2) use :remote=> true in the link_for or form tags
ex:- <%=link_to 'Remote Link', home_path,:remote=>true%>

it’s still in edgeguides but it’s a nice intro written by @steveklabnik (if i’m not mistaken)


I have just been reading this and finding it helpful background with
some nice examples: