I'm trying to ad the v-on:change attribute on a select element generated with select_tag
Something like this
<%= select_tag "worker_id", options_from_collection_for_select(@workers, "id", "name"), prompt: 'Choose', class: 'form-control', data: { "v-on:change" => "getWorker()" } %>
Also tried
<%= select_tag "worker_id", options_from_collection_for_select(@workers, "id", "name"), prompt: 'Choose', {}, { class: 'form-control', "v-on:change" => "getWorker()" } %>
Still no luck.
Aucun commentaire:
Enregistrer un commentaire