Sha256: d7dc66dcc680ba9af898eff970456d939eef5891b3e39d1d70f4351738e16046

Contents?: true

Size: 627 Bytes

Versions: 39

Compression:

Stored size: 627 Bytes

Contents

# frozen_string_literal: true

module Ariadne
  module Forms
    module Dsl
      # :nodoc:
      class HiddenInput < Input
        attr_reader :name, :value

        def initialize(name:, value:, **options)
          @name = name
          @value = value
          super(**options)
        end

        def to_component
          html_attrs = @input_attributes || {}
          Ariadne::Form::HiddenField::Component.new(name:, value:, html_attrs: html_attrs)
        end

        # :nocov:
        def type
          :hidden
        end

        def supports_validation?
          false
        end
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.92 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.91 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.90 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.89.1 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.89 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.88 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.87 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.9 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.8 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.7 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.6 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.5 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.4 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.3 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.2 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86.1 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.86 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.85 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.84 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.83.3 lib/ariadne/forms/dsl/hidden_input.rb