mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Document Action Text rich_text field attribute [ci skip]
Similar to: #42391
This commit is contained in:
parent
96f2cd010e
commit
ae8e593dc7
1 changed files with 6 additions and 0 deletions
|
@ -83,6 +83,12 @@ class Message < ApplicationRecord
|
|||
end
|
||||
```
|
||||
|
||||
or add rich text field while creating a new model using:
|
||||
|
||||
```
|
||||
bin/rails generate model Message content:rich_text
|
||||
```
|
||||
|
||||
**Note:** you don't need to add a `content` field to your `messages` table.
|
||||
|
||||
Then use [`rich_text_area`] to refer to this field in the form for the model:
|
||||
|
|
Loading…
Reference in a new issue