Created
February 10, 2014 23:56
-
-
Save bloudermilk/8926707 to your computer and use it in GitHub Desktop.
Is this anti-pattern bad news?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I find myself turning code like this | |
cat = Cat.find(params[:cat_id]) | |
laugh_at(cat) | |
# Into this | |
laugh_at( | |
Cat.find(params[:cat_id]) | |
) | |
# Any time a local variable is only used as an argument to a following method | |
# Bad news? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
4 years later and I still feel good using this pattern