app/fields/controllers/select_controller.rb in volt-fields-0.1.3 vs app/fields/controllers/select_controller.rb in volt-fields-0.2.0
- old
+ new
@@ -1,18 +1,7 @@
require 'fields/controllers/main_controller'
+require 'fields/controllers/select_radio_controller'
module Fields
- class SelectController < MainController
- def options
- if attrs.options[0].is_a?(Hash)
- options = attrs.options
- else
- options = attrs.options.collect { |option| { value: option, label: option } }
- end
- options
- end
-
- def selected?(value)
- true if value == model_inst.send(@field_name)
- end
+ class SelectController < SelectRadioController
end
end