Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Rename text_area helper to textarea for Rails 8 compatibility #181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aki77
Copy link

@aki77 aki77 commented Nov 27, 2024

This PR addresses the issue where the text_area helper is no longer functional in Rails 8 due to its renaming to textarea.

rails/rails#52467

Rename text_area to textarea
@Spone
Copy link
Collaborator

Spone commented Nov 28, 2024

Hi @aki77 thanks for contributing! Can you please add some tests to your PR?

@aki77
Copy link
Author

aki77 commented Nov 28, 2024

@Spone

Thank you for your response.

Since the output of the standard text_area helper and the ViewComponent::Form::TextAreaComponent is exactly the same, I’m struggling to figure out how to write a test to verify that the ViewComponent::Form::TextAreaComponent is actually being used.

Do you have any ideas or examples of similar tests that might be helpful?

Copy link
Member

@nicolas-brousse nicolas-brousse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aki77

I did a review and add a comment.
May you also do the following ?

  • Rename text_area by textarea in the README
  • Adding a line in the Changelog
  • Do the same changes for rich_text_area

If you need I may take time to finalize the changes.

@@ -19,6 +19,7 @@ def self.included(base)
label
phone_field
radio_button
textarea
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may keep it at auto generate like it was. Like for phone_field and telephone_field.

And so removing the textarea method bellow, and moving the alias just after alias_method :phone_field, :telephone_field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

text_area does not use TextAreaComponent
3 participants