# AJAX with Ruby

**URL:** <https://www.ruby-forum.com/t/ajax-with-ruby/120858>\
**Category:** Rails\
**Created:** [November 21, 2007, 7:38am UTC](https://www.ruby-forum.com/t/ajax-with-ruby/120858 "2007-11-21T07:38:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ed8c4c/32.png) [@nad](https://www.ruby-forum.com/u/nad)\
**Post date:** [November 21, 2007, 7:38am UTC](https://www.ruby-forum.com/t/ajax-with-ruby/120858/1 "2007-11-21T07:38:26Z")

</div>

hi all

i want to integrate AjAX to my ROR project. i have familiar using AJAX  
in normal HTML and PHP. but i could not found a way to use it in ROR. bz  
of MVC concept.(hard to call the controls and to models as wanted.)

so any body have some examples on simple AXAY using in ROR pls reply

Thanks

---

<div class="post-metadata">

**Author:** ![nad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ed8c4c/32.png) [@nad](https://www.ruby-forum.com/u/nad)\
**Post date:** [November 21, 2007, 8:17am UTC](https://www.ruby-forum.com/t/ajax-with-ruby/120858/2 "2007-11-21T08:17:44Z")

</div>

Nadeesha M. wrote:

> hi all
> 
> i want to integrate AjAX to my ROR project. i have familiar using AJAX  
> in normal HTML and PHP. but i could not found a way to use it in ROR. bz  
> of MVC concept.(hard to call the controls and to models as wanted.)
> 
> so any body have some examples on simple AXAY using in ROR pls reply
> 
> Thanks

There are a lot of helpers built into ruby on rails to get you rolling.  
Start at the API ([http://api.rubyonrails.com/](http://api.rubyonrails.com/)), and look into  
form\_remote\_tag and link\_to\_remote. You can also search the web for  
“RJS and Rails”.

You can, if you would rather, add your own javascript into the project  
by adding to public/javascripts/application.js or your own .js file.  
You can always add inline javascript in your views.

If that doesn’t work, you could just use a search engine and look for  
“Ruby on Rails and Ajax”, there is a ton of information out there. I  
was feeling lucky and got sent here:  
[Radar – O’Reilly](http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html), a tutorial that  
is almost as easy to follow as it was to find.
