Paul Phillips


1,120 Experience
11 Lessons Completed
0 Questions Solved


Posted in Dynamic Nested Forms with Turbo Discussion

After further testing, I can get methods 1 and 2 to work correctly, but still method three seems to call the html xxx_field partial and not the turbo_stream partial when clicking on the link_to to add a second nested object.. I can't figure out why.
Another question - I need to pass an array into my equivalent of the task partial. How to I do this on method 2 when using the button_tag that calls the stimulus controller?

Posted in Dynamic Nested Forms with Turbo Discussion

This is a very helpful video! I'm trying to implement version 3 - full-turbo-get. For some reason, the link_to on the form page to add a second task is not executing a turbo_stream, but rather is executing the html partial. In my case, the link looks like this:
<%= link_to "Add a Student", chamber_music_entry_field_chamber_music_groups_path, data: { turbo_stream: true } %>
The turbo_stream is not executing - rather, it loads the html version as a new page. My project is running rails 7.0.3 and turbo 1.3.2. What could be causing this?