Search code examples
ruby-on-rails-3law-of-demeter

Is has_many => :through a violation of the Law of Demeter?


If it is, what's its defence? And if it isn't, why isn't it?


Solution

  • I think it is declaring new neighbor, akin to delegation. OTOH, if it were possible, it might be getting a bit bad to do multiple :through levels... (Do I remember correctly that they made this possible lately?)