2010-01-09 15:05:02 +00:00
|
|
|
module SimpleForm
|
|
|
|
module Inputs
|
2012-01-26 20:10:34 +00:00
|
|
|
class CollectionSelectInput < CollectionInput
|
2010-01-09 15:05:02 +00:00
|
|
|
def input
|
2010-12-08 01:55:10 +00:00
|
|
|
label_method, value_method = detect_collection_methods
|
2012-01-26 19:14:08 +00:00
|
|
|
|
|
|
|
@builder.collection_select(
|
|
|
|
attribute_name, collection, value_method, label_method,
|
|
|
|
input_options, input_html_options
|
|
|
|
)
|
2010-01-09 15:05:02 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2010-09-27 02:21:30 +00:00
|
|
|
end
|