lib/formtastic/inputs/select_input.rb in formtastic-2.0.0 vs lib/formtastic/inputs/select_input.rb in formtastic-2.0.1
- old
+ new
@@ -182,20 +182,20 @@
extra_input_html_options.merge(super)
end
def extra_input_html_options
{
- :multiple => multiple_by_association?,
+ :multiple => multiple?,
:name => "#{object_name}[#{association_primary_key}]#{'[]' if multiple?}"
}
end
def multiple_by_association?
reflection && [ :has_many, :has_and_belongs_to_many ].include?(reflection.macro)
end
def multiple_by_options?
- options[:multiple]
+ options[:multiple] || (options[:input_html] && options[:input_html][:multiple])
end
def multiple?
multiple_by_options? || multiple_by_association?
end
\ No newline at end of file