Sha256: c16e5a82e9f1c99a5ba8a953b0ff437bdbc24faa27d2559a3288643922071ae7
Contents?: true
Size: 691 Bytes
Versions: 42
Compression:
Stored size: 691 Bytes
Contents
# = simple_form_for @thing do |f| # = f.input :category, :as => :effective_select if defined?(SimpleForm) class EffectiveSelectInput < SimpleForm::Inputs::CollectionSelectInput def input(wrapper_options = nil) label_method, value_method = (detect_collection_methods rescue [:to_s, :to_s]) options[:collection] = collection options[:label_method] = label_method unless options[:polymorphic] options[:value_method] = value_method unless options[:polymorphic] Inputs::EffectiveSelect::Input.new(object, object_name, template, attribute_name, input_options, (merge_wrapper_options(input_html_options, wrapper_options) || {})).to_html end end end
Version data entries
42 entries across 42 versions & 1 rubygems