Action variables not available in views with Ajax

The title pretty much describes my problem.

I have a standard Ajax call to an action the updates a portion of my
view.
However, variables set inside the action are not available in my view.
In
fact, NOTHING that happens in my action seems to affect my view. Calling
render :layout => false still gives me the flipping layout.

However, I know the Ajax call itself is working because I can do
whatever I
want in my view.

Any ideas?

  • Rabbit

Ah ha! The culprit was the method name: “load”

I knew the Ajax portion was working fine - I could see the proper
requests
coming through Webrick - so I decided to start a brand new application
and
make the simplest thing that could possibly work.

And sure enough, it did work. It was on a whim that I tried changing the
method name in my real application. Lucky me. :slight_smile:

Anyway, hopefully my folly will save others the hassle! Do not use
“load”
as a method name! (At least not with Ajax.)

  • Rabbit

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs