1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Update action_text_overview.md

Added additional overview in n+1 queries that the scope is named with the rich text field name.
This commit is contained in:
weiserma 2020-10-09 11:23:06 -04:00 committed by GitHub
parent 9492339979
commit 2cfdf71872
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,7 @@ end
## Avoid N+1 queries
If you wish to preload the dependent `ActionText::RichText` model, you can use the named scope:
If you wish to preload the dependent `ActionText::RichText` model, assuming your rich text field is named 'content', you can use the named scope:
```ruby
Message.all.with_rich_text_content # Preload the body without attachments.