# Mootools, Rails and Ajax

**URL:** <https://www.ruby-forum.com/t/mootools-rails-and-ajax/107081>\
**Category:** Rails\
**Created:** [June 17, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/mootools-rails-and-ajax/107081 "2007-06-17T23:15:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nguma\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/278dde/32.png) [@Nguma\_M](https://www.ruby-forum.com/u/Nguma_M)\
**Post date:** [June 17, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/mootools-rails-and-ajax/107081/1 "2007-06-17T23:15:21Z")

</div>

Recently, I’ve decided to include the excellent mootools in my  
projects.  
So, out prototype and scriptaculous, in mootools.

Everything went well up to the point i had to add some ajax into the  
story…

I am ok not to use remote\_ helpers, but it seems nothing comes back…  
As a newbie in this whole rails environment, i think i’m getting into  
something much bigger than my scope of knowledge.

so basically, i have in js a request that looks like this:

new Ajax(’/test’,  
{  
method:‘get’,  
data:‘abc123’,  
update:‘debug’,  
onComplete:'function(){alert(“complete”)}  
}

and in my controller:

def test  
render "you passed #{params[:data]}  
end

but absolutely nothing is passed to my debug, and no alert is being  
triggered.

please… help ☹

---

<div class="post-metadata">

**Author:** ![Nguma\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/278dde/32.png) [@Nguma\_M](https://www.ruby-forum.com/u/Nguma_M)\
**Post date:** [June 17, 2007, 11:20pm UTC](https://www.ruby-forum.com/t/mootools-rails-and-ajax/107081/2 "2007-06-17T23:20:49Z")

</div>

Nguma M. wrote:

> please… help ☹

If you use Firefox, I would recommend installing the Firebug extension:

[http://www.getfirebug.com/](http://www.getfirebug.com/)

It’s a great tool for debugging your js as well as it lets you see your  
ajax transactions to tell you were stuff isn’t working quite right.

---

<div class="post-metadata">

**Author:** ![Nguma\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/278dde/32.png) [@Nguma\_M](https://www.ruby-forum.com/u/Nguma_M)\
**Post date:** [June 18, 2007, 11:03pm UTC](https://www.ruby-forum.com/t/mootools-rails-and-ajax/107081/3 "2007-06-18T23:03:23Z")

</div>

I got to use firebug, which is great 🙂 thks,  
now my ajax request goes thorugh i run into another problem of  
returning a response without the use of  
ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods

does anyone have an example of a typical response that wouldn’t use  
page.insert\_thml or page.replace\_html ??

On Jun 17, 5:20 pm, Dave C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Nguma\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/278dde/32.png) [@Nguma\_M](https://www.ruby-forum.com/u/Nguma_M)\
**Post date:** [November 12, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/mootools-rails-and-ajax/107081/4 "2009-11-12T15:25:02Z")

</div>

Nguma M. wrote:

> Recently, I’ve decided to include the excellent mootools in my  
> projects.  
> So, out prototype and scriptaculous, in mootools.

Just a quick question: why? I’ve used both Prototype and Mootools, and  
it seems like Mootools is just a half-baked attempt at things that  
Prototype already does well.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Nguma\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/278dde/32.png) [@Nguma\_M](https://www.ruby-forum.com/u/Nguma_M)\
**Post date:** [November 12, 2009, 3:19pm UTC](https://www.ruby-forum.com/t/mootools-rails-and-ajax/107081/5 "2009-11-12T15:19:52Z")

</div>

Hi,  
I too came across same problem. I am using mootools with rails. Can you  
help in solving how to handle ajax response and request.

Nguma M. wrote:

> I got to use firebug, which is great 🙂 thks,  
> now my ajax request goes thorugh i run into another problem of  
> returning a response without the use of  
> ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods
> 
> does anyone have an example of a typical response that wouldn’t use  
> page.insert\_thml or page.replace\_html ??
> 
> On Jun 17, 5:20 pm, Dave C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
