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

Merge pull request #40995 from garrettdimon/patch-1

Add note for ActionText models that use UUID's [ci skip]
This commit is contained in:
Vipul A M 2021-02-08 12:03:28 +05:30 committed by GitHub
commit b1f1879a50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,6 +47,8 @@ happens after every keystroke, and avoids the need to use execCommand at all.
Run `bin/rails action_text:install` to add the Yarn package and copy over the necessary migration. Also, you need to set up Active Storage for embedded images and other attachments. Please refer to the [Active Storage Overview](active_storage_overview.html) guide.
NOTE: ActionText uses polymorphic relationships with the `action_text_rich_texts` table so that it can be shared with all models that have rich text attributes. If your models with ActionText content use UUID values for identifiers, all models that use ActionText attributes will need to use UUID values for their unique identifiers. The generated migration for ActionText will also need to be updated to specify `type: :uuid` for the `:record` `references` line.
After the installation is complete, a Rails app using Webpacker should have the following changes:
1. Both `trix` and `@rails/actiontext` should be required in your JavaScript pack.