Jeff Pritchard wrote:> Way back in the old days (Rails 1.1.6), you could go from an ajax form
> back to the real world by doing something like this:
>
> render :update do |page|
> page.redirect_to(:controller => ''foo'', :action =>
''bar'')
> end
>
> I just upgraded my in-progress app to 1.2.1, and this seems to be broken
> now. I get the dreaded old "redirection script showing up in the
> browser" thing happening, which is what this rjs snippet was supposed
to
> fix (and used to do).
>
> Is this no longer the proper way to redirect out of Ajax land? Or did I
> just mess up in some other way and weakly blame this on 1.2.1?
>
> thanks,
> jp
Make sure that your ajax call doesn''t have an :update key in it. If it
does, your javascript will be rendered as text since it''s not wrapped
in
a <script> tag.
If this is the problem than rails 1.2 is not to blame since I ran into
that in 1.1.6
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---