-
First, hope this is the right place for specific technical queries, let me know if not. Second, obligatory "noob" disclaimer. That out the way, I'm trying to use various rails helpers, most notably a path helper, within a component, whilst creating a second, internal component. Example:
for instance. This is hitting the " Is there a way to use the path helpers within a component, or is it simply not possible with the way they are built? Does the question even make sense? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Hi @fakeharxy can you copy the full component class? |
Beta Was this translation helpful? Give feedback.
-
I got here after receiving that error message about not being able to use before initialization. Found out it was because I was trying to access the URL helper within the component's |
Beta Was this translation helpful? Give feedback.
Here is how I would do it with slots (I removed all unrelated code for clarity). I haven't tested the code so it may need additional work :)
Then in the component template: