aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-04-13 14:10:18 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-04-13 14:10:18 -0700
commit491bee6e64863f2dc6e8d1f59829e61d4a8c86ad (patch)
treee5c536c6cd106685633d2e7d1fc67f2d8b95406c /README.md
parent7c4e70ea0bf0f00c0e919128447412fab49772f9 (diff)
downloadrails-491bee6e64863f2dc6e8d1f59829e61d4a8c86ad.tar.gz
rails-491bee6e64863f2dc6e8d1f59829e61d4a8c86ad.tar.bz2
rails-491bee6e64863f2dc6e8d1f59829e61d4a8c86ad.zip
Use rich_text instead of active_text
Just like we use has_many_attachments instead of active_storage_attachements.
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 8a21ed843b..b01cb8bbf3 100644
--- a/README.md
+++ b/README.md
@@ -37,11 +37,11 @@ Assumes a Rails 5.2+ application with Active Storage and Webpacker installed.
```ruby
# app/models/message.rb
class Message < ActiveRecord::Base
- active_text_attribute :content
+ has_rich_text :content
end
```
-1. Replace form `text_area`s with `active_text_field`s:
+1. Replace form `text_area`s with `rich_text_field`s:
```erb
<%# app/views/messages/_form.html.erb %>
@@ -49,7 +49,7 @@ Assumes a Rails 5.2+ application with Active Storage and Webpacker installed.
<div class="field">
<%= form.label :content %>
- <%= form.active_text_field :content %>
+ <%= form.rich_text_field :content %>
</div>
<% end %>