Reputation: 987
I have a subscriptions controller that at the end redirects to :root and a line on my routes file that points a url to that action. At first I was testing the action without any trouble. But yesterday I tried to change something and the server didn't respond to the changes, no matter what I put in the action it always ignores everything and redirects to :root.
This is how my action looks like:
def fail
test = Subscription.new
p test
binding.pry
redirect_to :account
end
This is my routes line:
match 'subscriptions/failed' => 'subscriptions#fail'
And whenever I try to go to subscriptions/failed
it ignores the print instruction, the binding instruction and redirects to :root
instead of :account
. If I comment everything on the action it will still do the same, the only different reaction it is when I delete the action. Probably obvious but I can't see it.
Upvotes: 0
Views: 142
Reputation: 6519
From your problem description, I would go and check if there is a before_filter or around_filter for fail
action that redirects to :root
. They would exactly do what you describe if the action is called and wont do anything and wont do anything if the action is not called.
May be you can post more code for the related controllers, just to be sure.
Upvotes: 1