Hi all,
Can any one tell me how to use Ajax with Rails.
Send me quick start up link and videos.
Thanks
Regards
Fahim Babar PAtel
Hi all,
Can any one tell me how to use Ajax with Rails.
Send me quick start up link and videos.
Thanks
Regards
Fahim Babar PAtel
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) http://edgeguides.rubyonrails.org/working_with_javascript_in_rails.html
cheers
I have just been reading this and finding it helpful background with some nice examples:
http://madebydna.com/all/code/2011/12/05/ajax-in-rails-3.html