Created
December 27, 2018 12:57
-
-
Save flaugabriel/a682e35ccc0ea23f57e5a3cd5ab4272d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If we go through Rails documenting, it clearly says — ‘With includes, | |
Active Record ensures that all of the specified associations are | |
loaded using the minimum possible number of queries’. | |
When we need data to be used from associated tables, includes must be used. | |
------------------------------- | |
Se passarmos pela documentação do Rails, ele diz claramente: | |
"Com includes, o Active Record garante que todas as associações | |
especificadas sejam carregadas usando o número mínimo possível de consultas". | |
Quando precisamos que os dados sejam usados nas tabelas associadas, | |
os includes devem ser usados. | |
-------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment