1
0
Fork 0
mirror of https://github.com/heartcombo/simple_form.git synced 2022-11-09 12:19:26 -05:00

retreive custom type for input with collection

This commit is contained in:
Iurii Plugatariov 2015-02-24 15:26:56 +02:00
parent 749c926140
commit 98c5413351

View file

@ -508,8 +508,8 @@ module SimpleForm
# collection is given.
def default_input_type(attribute_name, column, options)
return options[:as].to_sym if options[:as]
return :select if options[:collection]
custom_type = find_custom_type(attribute_name.to_s) and return custom_type
return :select if options[:collection]
input_type = column.try(:type)
case input_type