aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-06-27 16:20:58 +0200
committerGitHub <noreply@github.com>2018-06-27 16:20:58 +0200
commitb430ba4754f59934acb4806c83d10dee5af8de9e (patch)
tree1d7482d313f05a800f63a3a490293c9593b2a6a2 /README.md
parenta4af9580d604221ec36d2cd5671eb7f256ae5173 (diff)
parent60050ee41275eda25601beaa453e26841511d492 (diff)
downloadrails-b430ba4754f59934acb4806c83d10dee5af8de9e.tar.gz
rails-b430ba4754f59934acb4806c83d10dee5af8de9e.tar.bz2
rails-b430ba4754f59934acb4806c83d10dee5af8de9e.zip
Merge pull request #1 from basecamp/separate-rich-text-record
Separate Rich Text record
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 14 insertions, 6 deletions
diff --git a/README.md b/README.md
index 715c60e9c2..72eb6d44cf 100644
--- a/README.md
+++ b/README.md
@@ -10,8 +10,8 @@ Assumes a Rails 5.2+ application with Active Storage and Webpacker installed.
```ruby
# Gemfile
- gem "activetext", github: "basecamp/activetext", require: "action_text"
- gem "mini_magick" # for Active Storage variants
+ gem "actiontext", github: "basecamp/actiontext", require: "action_text"
+ gem "image_processing", "~> 1.2" # for Active Storage variants
```
1. Install the npm package:
@@ -19,7 +19,7 @@ Assumes a Rails 5.2+ application with Active Storage and Webpacker installed.
```js
// package.json
"dependencies": {
- "activetext": "basecamp/activetext"
+ "actiontext": "basecamp/actiontext"
}
```
@@ -29,9 +29,17 @@ Assumes a Rails 5.2+ application with Active Storage and Webpacker installed.
```js
// app/javascript/packs/application.js
- import "activetext"
+ import "actiontext"
```
+1. Migrate the database
+
+ ```
+ ./bin/rails active_storage:install
+ ./bin/rails action_text:install
+ ./bin/rails db:migrate
+ ```
+
1. Declare text columns as Action Text attributes:
```ruby
@@ -41,7 +49,7 @@ Assumes a Rails 5.2+ application with Active Storage and Webpacker installed.
end
```
-1. Replace form `text_area`s with `rich_text_field`s:
+1. Replace form `text_area`s with `rich_text_area`s:
```erb
<%# app/views/messages/_form.html.erb %>
@@ -49,7 +57,7 @@ Assumes a Rails 5.2+ application with Active Storage and Webpacker installed.
<div class="field">
<%= form.label :content %>
- <%= form.rich_text_field :content %>
+ <%= form.rich_text_area :content %>
</div>
<% end %>