If “hello” * 4 = “hellohellohellohello”, why doesn’t “x,y,z” / “,” = [“x”, “y”, “z”]?
-
Show this thread
-
-
-
Replying to @tqbf
This is no joke…we have a deprecated definition of `def /` on the user model so you can `some_user / :some_repo` to look up a repository on the console…it has been deprecated..but a bit of my soul dies each time I run across it.
1 reply 0 retweets 4 likes -
Replying to @patricktoomey @tqbf
I have a pattern in Rails projects where have some code which is not loaded by the environment and only loaded in console, which seems to me to strike a nice balance between supporting operations and not encouraging short-term affordances to corrupt longer-term code.
1 reply 0 retweets 1 like
A fairly common use case for me is re-opening a class and adding a "summarize" method to produce human-readable output, which I avoid doing in an actual model because that would *inevitably* lead to someone parsing summarize at some point.
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.
