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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060126/c32f8c70/attachment.html
Rabbit
2006-Jan-26 22:52 UTC
[Rails] Re: Action variables not available in views with Ajax
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. :) Anyway, hopefully my folly will save others the hassle! ***Do not use "load" as a method name! (At least not with Ajax.)*** - Rabbit --- On 1/26/06, Rabbit <rabbitblue@gmail.com> wrote:> > 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060126/399038a8/attachment.html