module SimpleForm::ActionViewExtensions::Builder
def render_collection(collection, value_method, text_method, options={}, html_options={}) #:nodoc:
def render_collection(collection, value_method, text_method, options={}, html_options={}) #:nodoc: item_wrapper_tag = options.fetch(:item_wrapper_tag, :span) item_wrapper_class = options[:item_wrapper_class] collection.map do |item| value = value_for_collection(item, value_method) text = value_for_collection(item, text_method) default_html_options = default_html_options_for_collection(item, value, options, html_options) rendered_item = yield item, value, text, default_html_options item_wrapper_tag ? @template.content_tag(item_wrapper_tag, rendered_item, :class => item_wrapper_class) : rendered_item end.join.html_safe end