From ffade9b03c369e2e4a687f56e7648f5fb5168ea9 Mon Sep 17 00:00:00 2001 From: Alvin Crespo Date: Mon, 9 Dec 2024 09:56:46 -0500 Subject: [PATCH 1/3] Adjust rich_text_area to rich_textarea for Rails 8 compatibility --- docs/compatibility.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/compatibility.md b/docs/compatibility.md index ded7dfd13..0992b8b54 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -39,10 +39,10 @@ With the monkey patch disabled, use `render_component` (or `render_component_to Using `rich_text_area` from ActionText in a ViewComponent will result in this error: -`undefined method "rich_text_area_tag"` +`undefined method "rich_textarea_tag"` This is due to ViewComponent not having access to the helpers it needs via ActionText. As a workaround, add the following to your component (or base component): ```ruby -delegate :rich_text_area_tag, to: :helpers +delegate :rich_textarea_tag, to: :helpers ``` From 1e48f973a1bc83b06e282f7972387775d78e271d Mon Sep 17 00:00:00 2001 From: Alvin Crespo Date: Wed, 11 Dec 2024 08:43:17 -0500 Subject: [PATCH 2/3] PR feedback - implementing missed update Co-authored-by: Hans Lemuet --- docs/compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/compatibility.md b/docs/compatibility.md index 0992b8b54..37653886e 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -37,7 +37,7 @@ With the monkey patch disabled, use `render_component` (or `render_component_to ## ActionText -Using `rich_text_area` from ActionText in a ViewComponent will result in this error: +Using `rich_textarea` from ActionText in a ViewComponent will result in this error: `undefined method "rich_textarea_tag"` From 26d66387d42574ce500cce793aef3149fe887476 Mon Sep 17 00:00:00 2001 From: Alvin Crespo Date: Wed, 11 Dec 2024 13:54:40 +0000 Subject: [PATCH 3/3] Adds CHANGELOG entry for ActionText / Rails 8.0 --- docs/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 47841816c..9760606aa 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -26,6 +26,10 @@ nav_order: 5 *Reegan Viljoen* +* Updates ActionText compatibility documentation to reference `rich_textarea_tag` for Rails 8.0 support. + + *Alvin Crespo* + ## 3.20.0 * Allow rendering `with_collection` to accept an optional `spacer_component` to be rendered between each item.