lib/formtastic/inputs/select_input.rb in formtastic-2.3.0.rc3 vs lib/formtastic/inputs/select_input.rb in formtastic-2.3.0.rc4

- old
+ new

@@ -142,16 +142,25 @@ include Base::Collections include Base::GroupedCollections def to_html input_wrapping do - hidden_input << + deprecated_hidden_input << label_html << (options[:group_by] ? grouped_select_html : select_html) end end + # TODO: remove from Formtastic 3.0 + def deprecated_hidden_input + if multiple? && Util.rails3? && Util.deprecated_version_of_rails? + template.hidden_field_tag(input_html_options_name_multiple, '', :id => nil) + else + "".html_safe + end + end + def select_html builder.select(input_name, collection, input_options, input_html_options) end def grouped_select_html @@ -169,17 +178,9 @@ def include_blank options.key?(:include_blank) ? options[:include_blank] : (single? && builder.include_blank_for_select_by_default) end - def hidden_input - if multiple? - template.hidden_field_tag(input_html_options_name_multiple, '', :id => nil) - else - "".html_safe - end - end - def prompt? !!options[:prompt] end def label_html_options