File: collection_radio_buttons.rb

package info (click to toggle)
ruby-bootstrap-form 5.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 520 kB
  • sloc: ruby: 1,447; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 510 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

module BootstrapForm
  module Inputs
    module CollectionRadioButtons
      extend ActiveSupport::Concern
      include Base
      include InputsCollection

      included do
        def collection_radio_buttons_with_bootstrap(*args)
          args[4]&.delete(:id)
          inputs_collection(*args) do |name, value, options|
            radio_button(name, value, options)
          end
        end

        bootstrap_alias :collection_radio_buttons
      end
    end
  end
end