Flowdock
method

render_collection_for

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: CollectionHelpers
render_collection_for(builder_class, &block) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/helpers/tags/collection_helpers.rb, line 87
          def render_collection_for(builder_class, &block)
            options = @options.stringify_keys
            rendered_collection = render_collection do |item, value, text, default_html_options|
              builder = instantiate_builder(builder_class, item, value, text, default_html_options)

              if block_given?
                @template_object.capture(builder, &block)
              else
                render_component(builder)
              end
            end

            # Prepend a hidden field to make sure something will be sent back to the
            # server if all radio buttons are unchecked.
            if options.fetch("include_hidden", true)
              hidden_field + rendered_collection
            else
              rendered_collection
            end
          end
Register or log in to add new notes.