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:
parent
9492339979
commit
2cfdf71872
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue