Forum: Ruby on Rails Problems redirecting from form_remote_tag

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
ginty (Guest)
on 2008-10-22 04:20
(Received via mailing list)

A noob question no doubt but when I use form_remote_tag to make an
AJAX call to the server I can't make  it redirect to re-render the
entire page.

So for example the below code from /controller/index.html.erb invokes
the call...

<% form_remote_tag :url => {:action => :foo} do %>

  ...form stuff...

    <%= submit_tag "Submit" %>
<% end %>

And then a redirect from add_to_cart won't work...

def foo
      redirect_to :action => :index

Any thoughts?

This topic is locked and can not be replied to.