Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delegator to model's associations (The Law of Demeter) #33

Open
felipefontoura opened this issue Dec 1, 2015 · 3 comments
Open
Labels

Comments

@felipefontoura
Copy link
Contributor

Hey!

I suggest to implement this best practice: http://rails-bestpractices.com/posts/2010/07/24/the-law-of-demeter/

It's avoid this problem:

@invoice.user.name # <= name not is a function of nil.
@felipefontoura
Copy link
Contributor Author

Hey @internetsistemas/repense-developers please check this propose. I have been used in a personal project I liked so much.

@romarioclacino
Copy link
Contributor

👍

1 similar comment
@rodrigosggouvea
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants