Replies: 1 comment
-
@nc163 reading this through, nothing specifically jumps out to me. I'd need to dig into your example code in a running context to understand the issue, which I don't have time to do. I'd recommend going that route yourself. If you do, please report back what you find and perhaps it will help us find some potential improvements to ViewComponent and/or the docs ❤️ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m looking for a way to set HTML data attributes.
When setting HTML data attributes, etc., from the view, I’m unsure about the timing of the rendering process. Here's the problematic code:
The with_head_content method in the card class is defined as follows:
My goal is to set class or data attributes for the render Text.new() do |text| part from the view. I added the following set_attributes method in the Text class:
I intended to use set_attributes to set the attributes and then render them in the call method, but they seem to be ignored.
What am I misunderstanding? Is there a way to resolve this?
Beta Was this translation helpful? Give feedback.
All reactions