-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Doesn't work with View Component >= 3.9.0 #8
Comments
I'm inclined to just copy the patch over from citizensadvice/design-system#3362. Any further thoughts @DRBragg and @davidrapson? |
Unfortunately we've hit a new error with view component 3.15+ which we're trialing a patch for here citizensadvice/design-system#3503 Not sure how robust that patch is as I'd sidestepped an issue with I think the direction of stubbing in a controller/request object is along the right lines as I think increasingly view component is relying on that being present, which is not the case in a bridgetown context, but still not convinced I've got the right angle on a patch. I'd be happy to put together a reduced test case with the latest version if that would help. |
TBH I haven't touched this is quite some time. If I have some free time in the next week or so I'll take another look at it but until I do I lack update to date enough knowledge to have an informed opinion |
Attempting to upgrade the
view_component
gem and running into an issue.Doing a bit of digging I found a change in VC 3.9 that might(?) be a source of the problem: ViewComponent/view_component#1950 specifically the changes to
lib/view_component/base.rb:310
.It looks like when
request
is called it's calling therequest
method inbridgetown-routes/lib/bridgetown-routes/view_helpers.rb:22
which looks atview.resource&.roda_app
. In my case the "view" in question appears to be the component instance.If I add
to the
BaseComponent
everything boots and renders as normal. Not 100% sure if this is the correct work around it just works for me.Versions
bridgetown: 1.3.4
bridgetown-view-component: 2.0
view_component: >= 3.9.0
config/initializers.rb
Let me know if there's any other information I can provide that might be helpful.
The text was updated successfully, but these errors were encountered: