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

move shouldLoad check from register to load function #493

Merged
merged 1 commit into from
Nov 25, 2021

Conversation

adrienpoly
Copy link
Member

@adrienpoly adrienpoly commented Nov 22, 2021

The current implementation of shouldLoad lives in the register function. This function is used to manually register individual controllers. Another option to register controllers is to use the load function. This has been the advertise way of loading controllers with the webpacker helpers and remains the recommended solution.

But the shouldLoad function is only used in register function not in load. This PR move the shouldLoad check from register down to load.

@dhh dhh merged commit ab531d4 into hotwired:main Nov 25, 2021
@adrienpoly adrienpoly deleted the should-load branch November 25, 2021 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants