Replies: 1 comment 1 reply
-
@oboxodo thanks for the report! We do have an integration test for Might you be up for trying to introduce a PR with a failing test for this bug? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there 👋 ,
I'm upgrading a big app from Rails 6.0 to 6.1. We use
ViewComponent
v2.34.0.After upgrading one of our tests fails because some code like
my_html = render_to_string(MyViewComponent.new)
is returning an empty string (""
) instead of the rendered component.I understand Rails 6.1 should support
ViewComponent
nativelly and it does when usingrender
, but apparently not when usingrender_to_string
. After looking at the monkey patch for version < 6.1 I was able to make it work withmy_html = MyViewComponent.new.render_in(view_context)
.But shouldn't
render_to_string
still work? Or at least be mentioned in the docs? Did I miss something? Is this the best place to get what I want?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions