diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2018-04-13 14:10:18 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2018-04-13 14:10:18 -0700 |
commit | 491bee6e64863f2dc6e8d1f59829e61d4a8c86ad (patch) | |
tree | e5c536c6cd106685633d2e7d1fc67f2d8b95406c /README.md | |
parent | 7c4e70ea0bf0f00c0e919128447412fab49772f9 (diff) | |
download | rails-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.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 %> |