Sha256: 4314ddfe035d8895e2263378afe0da24ecf572828cd5d5dc15efe1e14c478760

Contents?: true

Size: 864 Bytes

Versions: 42

Compression:

Stored size: 864 Bytes

Contents

# frozen_string_literal: true

require "action_view/helpers/tags/collection_helpers"

module ActionView
  module Helpers
    module Tags # :nodoc:
      class CollectionRadioButtons < Base # :nodoc:
        include CollectionHelpers
        include FormOptionsHelper

        class RadioButtonBuilder < Builder # :nodoc:
          def radio_button(extra_html_options = {})
            html_options = extra_html_options.merge(@input_html_options)
            html_options[:skip_default_ids] = false
            @template_object.radio_button(@object_name, @method_name, @value, html_options)
          end
        end

        def render(&block)
          render_collection_for(RadioButtonBuilder, &block)
        end

        private
          def render_component(builder)
            builder.radio_button + builder.label
          end
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 6 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/actionview-7.1.3.4/lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-8.0.1 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-8.0.0.1 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-7.2.2.1 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-7.1.5.1 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-8.0.0 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-7.2.2 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-7.1.5 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-8.0.0.rc2 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-7.2.1.2 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-7.1.4.2 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-8.0.0.rc1 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-7.2.1.1 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-7.1.4.1 lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview-8.0.0.beta1 lib/action_view/helpers/tags/collection_radio_buttons.rb
omg-actionview-8.0.0.alpha9 lib/action_view/helpers/tags/collection_radio_buttons.rb
omg-actionview-8.0.0.alpha8 lib/action_view/helpers/tags/collection_radio_buttons.rb
omg-actionview-8.0.0.alpha7 lib/action_view/helpers/tags/collection_radio_buttons.rb
omg-actionview-8.0.0.alpha4 lib/action_view/helpers/tags/collection_radio_buttons.rb
omg-actionview-8.0.0.alpha3 lib/action_view/helpers/tags/collection_radio_buttons.rb