From c7a812535d6fdb744fd9fca1e3216cbe4c2038a5 Mon Sep 17 00:00:00 2001 From: Hartley McGuire Date: Fri, 26 May 2023 18:24:14 -0400 Subject: [PATCH] Add doc for FormBuilder#rich_text_area Using the style of other ActionView::Helpers::FormBuilder methods that delegate to another method. --- actiontext/app/helpers/action_text/tag_helper.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/actiontext/app/helpers/action_text/tag_helper.rb b/actiontext/app/helpers/action_text/tag_helper.rb index 4642ef0f790d0..e2bd11a88a07a 100644 --- a/actiontext/app/helpers/action_text/tag_helper.rb +++ b/actiontext/app/helpers/action_text/tag_helper.rb @@ -83,6 +83,13 @@ def rich_text_area(object_name, method, options = {}) end class FormBuilder + # Wraps ActionView::Helpers::FormHelper#rich_text_area for form builders: + # + # <%= form_with model: @message do |f| %> + # <%= f.rich_text_area :content %> + # <% end %> + # + # Please refer to the documentation of the base helper for details. def rich_text_area(method, options = {}) @template.rich_text_area(@object_name, method, objectify_options(options)) end