Displaying 2 results from an estimated 2 matches for "ops_select".
Did you mean:
bss_select
2014 Apr 23
0
Select fields, Coffeescript and Cocoon
...plies values
for each select field-set separately.
My code:
form
<%= render 'usergroup_fields', :f => usergroup %>
<%= link_to_add_association "Add Group", f, :usergroups %>
usergroup_fields:
<%= f.select :ops_group_id, options_for_select(@groups…..{ id: 'ops_select'
} %>
<%= f.select :oncall_id, options_for_select(@oncalls….{ id:
'oncalls_select' } %>
Coffee:
$ ->
$(document).on 'change', ('#ops_select'), ->
$.ajax '/projects/update_oncalls/',
type: 'GET'
dataType: 'script'...
2014 May 06
0
js .closest
I have a script:
$ ->
$(document).on 'change', ('.ops_select'), ->
val = $(".ops_select option:selected").val()
$.ajax '/projects/update_oncalls/',
type: 'GET'
dataType: 'script'
data: {ops_group_id: val }
which triggers a "update_concalls.js.coffee" file to replace a the value in...