Skip to content

Instantly share code, notes, and snippets.

@bloudermilk
Created February 10, 2014 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bloudermilk/8926707 to your computer and use it in GitHub Desktop.
Save bloudermilk/8926707 to your computer and use it in GitHub Desktop.
Is this anti-pattern bad news?
# 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?
@bloudermilk
Copy link
Author

4 years later and I still feel good using this pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment