Actually managed to fix it myself...

I found from the log that I was getting the following error:

ActionController::DoubleRenderError (Can only render or redirect once
per action):

And it seems that it was caused by the fact that I didn't realize that
the code flow continues in the action after the redirect.

So what I didn't show in the first message was that my action was
actually more like:

def foo
      if @failed
           redirect_to :action => :index      # I thought the code
flow would cease here if failed
      end
      blah blah
      redirect_to :action => :somewhere_else   # but actually it
continues and picks up this second redirect also
end
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to