1

When I submit a form I receive a 'you are being redirected' message, which a user has to click in order to move to the redirect. This is undesired and unintended.

I don't know what changes in the code caused this, and I've done too much work to go back and find out the cause without knowing what to look for.

The page which contains the form has a couple of xhr actions rendering to the page. But there is nothing new within the scope of the form itself so I doubt if this is the issue.

Looking at the various other SO posts relating to this question, I have attempted changing my redirect_to to

redirect_to action: :edit, :status => 302

but no joy.

Many Thanks.

Update

what makes this different to other questions is that this is occurring across all post/patch/delete actions.

Community
  • 1
  • 1
rico_mac
  • 888
  • 8
  • 22
  • Possible duplicate of [Ruby-on-Rails: How to get rid of "you are being redirected" page](http://stackoverflow.com/questions/4310913/ruby-on-rails-how-to-get-rid-of-you-are-being-redirected-page) – Shahzad Tariq Feb 09 '16 at 13:05

1 Answers1

1

I have a dynamic method setter in my application controller which was setting a method name using the word 'Location'. Removing references to 'location' in the application controller fixed this. 'Location' is a reserved word in Rails ActionController::Dispatcher.

I hope this answer helps any one else who finds themselves in a similar predicament.

rico_mac
  • 888
  • 8
  • 22