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

Remove the require expression for action text in lib/bootstrap_form.rb #720

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

jdufresne
Copy link
Contributor

@jdufresne jdufresne commented Nov 28, 2023

This require was added in e6f5b09 to add ActionText support.

Instead of eagerly loading the module, allow the Rails engine subsystem to load the helpers as necessary.

Eagerly loading the module has the downside of defining the module ActionText even when the engine is not in use. Defining the module like this can "trick" other gems into erroneously loading their ActionText support, which may lead to confusing and out of context error messages.

Fixes #719

This require was added in e6f5b09 to
add ActionText support.

Instead of eagerly loading the module, allow the Rails engine subsystem
to load the helpers as necessary.

Eagerly loading the module has the downside of defining the module
ActionText even when the engine is not in use. Defining the module like
this can "trick" other gems into erroneously loading their ActionText
support, which may lead to confusing and out of context error messages.
@jdufresne
Copy link
Contributor Author

jdufresne commented Nov 28, 2023

I would appreciate it if someone that uses ActionText in their project could test this branch and report what errors they see and when.

@jdufresne jdufresne marked this pull request as ready for review November 28, 2023 14:56
@lcreid
Copy link
Contributor

lcreid commented Nov 29, 2023

The demo app (in the demo directory) uses ActionText and it seems to run fine. I don't have any other current apps that use ActionText, but I'll probably merge this and see if we get complaints from people using the code from main.

@lcreid lcreid merged commit df6f7e9 into bootstrap-ruby:main Nov 29, 2023
18 checks passed
@jdufresne jdufresne deleted the action-text-require branch December 1, 2023 13:46
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.

Lazy load ActionText helpers
2 participants