> You *could*  write wrapper methods for chains like this and make Demeter
> happy, but to do that for every single call...

Thank you for your experience. I myself used to wrap these kind of 
associations but I felt it started to clutter the Model file, so I 
started to use association callbacks.

My heart balances between both ideas. Anyway if attr_accessible is used, 
then you must write a wrapper, but in other cases? Which is the most 
effective / maintainable / etc is still to be questioned.

Honestly, each time something backfired at me in a very unexpected 
manner, it was due to the fact that somewhere far far away I had broken 
Demeter's law. So I'd like to get this fixed once and for all.
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to