> 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 this thread
-
the > X ? some_url : :back was actually pretty clever; it was a trampoline that inspected user state to figure out the next page, and - only if that failed - would a :back be generated but now instead of a single func redirect_to that takes a general purpose argument
1 reply 0 retweets 2 likesShow this thread -
3/ we've got two distinct functions this is like saying "we used to have a glass that holds either milk or soda, but now we've IMPROVED that by having two distinct things: a soda mug and a milk stein, and ...each throws an error if you try to put the other thing in it" thanks
5 replies 0 retweets 5 likesShow this thread -
-
Replying to @random_eddie @MorlockP
"What version of Rails do you use?" "Rails 5 + morlock_fixes_stupid_broken_crap.lib"
1 reply 0 retweets 1 like -
Replying to @random_eddie
the great thing about that library is that it's compatible with all versions of rails going back to 2.0
1 reply 0 retweets 1 like
I think the file name is basichacks.rb, tho
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.