Curated list of episodes, bundled to help you on your learning path!
Videos of tech, infrastructure, hardware and software which non-instructional by nature.
Articles around software and tutorials.
Show your love and support while looking fancy.
Got a question or want to chat about a topic? Let's talk!
"data-dynamic-select-target": "secondarySelect"
<div data-controller="dynamic-select" data-dynamic-select-url-value="<%= filtered_projects_organizations_path %>" data-dynamic-select-selected-value="<%= task.project_id %>" > <%= form.label :organization_id %> <%= form.select :organization_id, Organization.all.map { |o| [o.name, o.id] }, { prompt: 'Please select an organization' }, { "data-action": "change->dynamic-select#updateProjects", "data-dynamic-select-target": "mainSelect" } %> </div> <div> <%= form.label :project_id %> <%= form.select :project_id, [], { prompt: 'Please select a project' }, { "data-dynamic-select-target": "secondarySelect" } %> </div>
I'd like to use turbo without the Redis+ActionCable dependency and the features that rely on them.
I cannot seem to get this working. It is throwing a:
Error invoking action "change->dynamic-select#updateProjects"
Error: Missing target element "secondarySelect" for "dynamic-select" controller
I am running the latest version of Rails and wondering if something has changed since you made this episode...?
I do have that in place. My code is:
Is it possible to extend this to a third select option?
If so, how?