-
Notifications
You must be signed in to change notification settings - Fork 444
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
[Docs]Update document for changing view_component_path #1870
[Docs]Update document for changing view_component_path #1870
Conversation
Thanks for reporting this! I'm wondering if we can inject the |
Sounds a better idea! |
Would you like to try it and open a PR for the changes? |
After that I change my mind: just adding the documents might be safer because the eager-loading config is explicit and we don't need to change the current code. How about this? I'm also a bit worried about changing the code might affect some patches to ViewComponent such as following: |
Maybe we can get the view_component_contrib maintaners to join this discussion, they may be keen to add this to their lib too |
@Spone @camertron Since this could be a breaking change I suggest that maybe we add this to v4 checklist |
What specifically would be the danger in automatically adding the |
From what I understand their is a bit of concern that existing community patches may break but on further thought we can't gurantee the stability of other libraries that patch vc |
@reeganviljoen right yeah, I'm curious about the specific issues community patches would have if ViewComponent were to automatically append to the set of Rails eager load paths. It's possible we need to do some investigation here. |
Going to merge this for now since it's just a documentation change 👍 |
…#1870) * Update document for changing view_component_path * Update docs/CHANGELOG.md * Update docs/guide/generators.md --------- Co-authored-by: Cameron Dutro <[email protected]>
…#1870) * Update document for changing view_component_path * Update docs/CHANGELOG.md * Update docs/guide/generators.md --------- Co-authored-by: Cameron Dutro <[email protected]>
What are you trying to accomplish?
I'm trying to update the document so that users can change the
view_component_path
.What approach did you choose and why?
I got stuck when I tried to introduce ViewComponent to Rails 7.1 app because changing just
config.view_component.view_component_path
did not work.Finally I found that
config.eager_load_paths
should also be changed with the same path to get this change work.I checked the fact with the newly generated Rails 7.1/7.0/6.1 apps.