Sha256: 07c0f2e8d903893df3ab90b3a4490e4cf584be2112fdf9a7437034ada1c41a86

Contents?: true

Size: 888 Bytes

Versions: 37

Compression:

Stored size: 888 Bytes

Contents

# frozen_string_literal: true

module ActionView
  module Helpers
    module Tags # :nodoc:
      class WeekdaySelect < Base # :nodoc:
        include SelectRenderer
        include FormOptionsHelper

        def initialize(object_name, method_name, template_object, options, html_options)
          @html_options = html_options

          super(object_name, method_name, template_object, options)
        end

        def render
          select_content_tag(
            weekday_options_for_select(
              value || @options[:selected],
              index_as_value: @options.fetch(:index_as_value, false),
              day_format: @options.fetch(:day_format, :day_names),
              beginning_of_week: @options.fetch(:beginning_of_week, Date.beginning_of_week)
            ),
            @options,
            @html_options
          )
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 5 rubygems

Version Path
actionview-8.0.0 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.2.2 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.1.5 lib/action_view/helpers/tags/weekday_select.rb
actionview-8.0.0.rc2 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.2.1.2 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.1.4.2 lib/action_view/helpers/tags/weekday_select.rb
actionview-8.0.0.rc1 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.2.1.1 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.1.4.1 lib/action_view/helpers/tags/weekday_select.rb
actionview-8.0.0.beta1 lib/action_view/helpers/tags/weekday_select.rb
omg-actionview-8.0.0.alpha9 lib/action_view/helpers/tags/weekday_select.rb
omg-actionview-8.0.0.alpha8 lib/action_view/helpers/tags/weekday_select.rb
omg-actionview-8.0.0.alpha7 lib/action_view/helpers/tags/weekday_select.rb
omg-actionview-8.0.0.alpha4 lib/action_view/helpers/tags/weekday_select.rb
omg-actionview-8.0.0.alpha3 lib/action_view/helpers/tags/weekday_select.rb
omg-actionview-8.0.0.alpha2 lib/action_view/helpers/tags/weekday_select.rb
omg-actionview-8.0.0.alpha1 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.1.4 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.2.1 lib/action_view/helpers/tags/weekday_select.rb
actionview-7.2.0 lib/action_view/helpers/tags/weekday_select.rb