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

Add config.include_application_routes to allow skipping inclusion of application routes #1906

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

Conversation

elia
Copy link
Collaborator

@elia elia commented Nov 9, 2023

What are you trying to accomplish?

Work with components for Rails engines that provide route helpers that should stay separated from the main app routes.

What approach did you choose and why?

Instead of trying to automatically detect and include the engine's routes seems better to just opt out of application routes and manually include MyGem::Engine.routes.url_helpers.

Anything you want to highlight for special attention from reviewers?

Would be even better to opt out of application routes individually for children of ViewComponent::Base so that the engine components can have their base class while ApplicationComponent still gets the app routes by default.

…f application routes

This comes in handy when using components from within engine that shouldn't access
application routes and can opt for including engine routes instead.
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.

None yet

1 participant