> Improvement in Rails 5 In Rails 5, redirect_to :back has been deprecated and instead a new method has been added called redirect_back. "improvement" sigh so now my code that used to say return redirect_to foo() def foo X ? some_url : :back end doesn't work
-
- Show replies
New conversation -
-
You're welcome. This is quite helpful later on when you find your general-purpose container full of used machine oil when you were expecting it to have tea.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Huh. I wonder why they made that change and what it is supposed to improve. I suspect that `redirect_to :back` has some nonobvious footgun, but I can't guess what it is.
-
It threw an exception if the Referer header wasn't present. The new one takes a fallback URL to use for that case.
- Show replies
New conversation -
-
-
I'm not surprised, the reason usually has more to do with readability then functionality though in this case I have no idea.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.