Skip to content

Commit da871cc

Browse files
Merge pull request rails#50252 from seanpdoyle/rich-text-area-docs
Action Text `rich_text_area` code samples [ci-skip]
2 parents 6908a66 + 638c9d5 commit da871cc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

actiontext/app/helpers/action_text/tag_helper.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,11 @@ module FormHelper
6666
# * <tt>[:data][:blob_url_template]</tt> - Defaults to <tt>rails_service_blob_url(":signed_id", ":filename")</tt>.
6767
#
6868
# ==== Example
69-
# form_with(model: @message) do |form|
70-
# form.rich_text_area :content
71-
# end
69+
# rich_text_area :message, :content
7270
# # <input type="hidden" name="message[content]" id="message_content_trix_input_message_1">
7371
# # <trix-editor id="content" input="message_content_trix_input_message_1" class="trix-content" ...></trix-editor>
7472
#
75-
# form_with(model: @message) do |form|
76-
# form.rich_text_area :content, value: "<h1>Default message</h1>"
77-
# end
73+
# rich_text_area :message, :content, value: "<h1>Default message</h1>"
7874
# # <input type="hidden" name="message[content]" id="message_content_trix_input_message_1" value="<h1>Default message</h1>">
7975
# # <trix-editor id="content" input="message_content_trix_input_message_1" class="trix-content" ...></trix-editor>
8076
def rich_text_area(object_name, method, options = {})

0 commit comments

Comments
 (0)