view_component: [1.3.6] Could not find a template file for BodyComponent
For version 1.3.5 everything is fine. The problem appeared in version 1.3.6. Rails 6.0.0.
I have a simple component. Only content is transferred to it. After upgrading to version 1.3.6, I started getting the following error:
NotImplementedError - Could not find a template file for BodyComponent.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23 (18 by maintainers)
Commits related to this issue
- explicitly remove extension from path vs splitting on '.' Our existing implementation of looking up sibling template files split the source_location path on '.', assuming that the .rb file extension ... — committed to ViewComponent/view_component by joelhawksley 5 years ago
- explicitly remove extension from path vs splitting on '.' Our existing implementation of looking up sibling template files split the source_location path on '.', assuming that the .rb file extension ... — committed to ViewComponent/view_component by joelhawksley 5 years ago
❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️
HUGE thanks to @afuno here! We were able to figure out the source of this bug: file paths with other periods in them besides the suffix of the component file.
I’ll have a fix for this shortly.
@topherfangio thanks for sharing that! (again)
I’d be open to a PR that adds
selftoview_context.capture, as well as one that adds hooks.I’m also not against making
contentprotected, if not public.Feel free to file issues for any of these ❤️
@afuno the fix is in
master. Can you make sure it works for you?I’ll try to get a release out tomorrow.
@joelhawksley I could not reproduce. Too many things. I sent you an invite to the application.
Update gem version in gemfile. Run through: