

The Law of Demeter for Ruby on Rails - eclipseman
http://www.codebeerstartups.com/2013/05/the-law-of-demeter-for-ruby-on-rails/

======
dragonwriter
I suspect that the bigger code smell there is a property called "user" on an
object called "invoice"; while their may well be a table of users which is
referenced from the invoice, the role of the user with regard to the invoice
is probably (guessing from the attributes that are being referenced) something
like "customer" (or some specific line-of-business equivalent, like "tenant".)

Code that doesn't say what it means is a bigger maintainability problem that
code that "sees" objects a step farther out than is ideal.

