Skip to content

Use Rails.root to determine if template is local#74

Merged
marcoroth merged 1 commit intomainfrom
local-templates
Feb 7, 2026
Merged

Use Rails.root to determine if template is local#74
marcoroth merged 1 commit intomainfrom
local-templates

Conversation

@marcoroth
Copy link
Copy Markdown
Owner

@marcoroth marcoroth commented Feb 7, 2026

Follow up on #56

The approach we used in #56 also wasn't quite right, as it wasn't detecting templates in #{Rails.root}/app/components since they weren't part of the view_parts.

Instead, let's just consider everything a local template if it's within Rails.root, which should work for internal engines, packwerk etc.

Related marcoroth/herb#1088
Related marcoroth/herb#1132

@marcoroth marcoroth merged commit 1d3a090 into main Feb 7, 2026
24 checks passed
@marcoroth marcoroth deleted the local-templates branch February 7, 2026 09:38
@HashNotAdam
Copy link
Copy Markdown
Contributor

Thanks @marcoroth! While #56 used to work for me, a dependency change caused things to break and I really appreciate that you're already on top of it

@marcoroth
Copy link
Copy Markdown
Owner Author

Great, even better @HashNotAdam! Thanks for confirming! I'm glad this is not going to break your previous setup! 😅

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.

2 participants