dependent_select 0.7.0 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -404,7 +404,7 @@ module DependentSelect::FormHelpers
404
404
  "'#{initial_value}', #{include_blank}, #{collapse_spaces}, false); }"
405
405
 
406
406
  if(DependentSelect.use_jquery?)
407
- observers = "$('##{observed_field_id}').bind('change', #{js_callback});\n"
407
+ observers = "$('##{observed_field_id}').change(#{js_callback});\n"
408
408
  else
409
409
  observers = "$('#{observed_field_id}').observe('change', #{js_callback});\n" +
410
410
  "$('#{observed_field_id}').observe('DependentSelectFormBuilder:change', #{js_callback}); \n"
@@ -414,7 +414,7 @@ module DependentSelect::FormHelpers
414
414
  "#{js_function}( '#{dependent_field_id}', '#{observed_field_id}', #{js_array_name}, " +
415
415
  "'#{initial_value}', #{include_blank}, #{collapse_spaces}, true);\n"
416
416
 
417
- javascript_tag(js_array_code + observers + initial_call)
417
+ return javascript_tag(js_array_code + observers + initial_call)
418
418
  end
419
419
 
420
420
  # generates the js script for a dependent_collection_select. See +dependent_select_js+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependent_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Enrique Garcia Cota (egarcia)