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.83.2 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.83.1 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.83 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.82 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.81 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.80.3 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.79.2 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.79.1 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.79 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.78 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.77 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.76.1 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.76 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.75 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.74.1 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.74 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.73 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.72 lib/ariadne/forms/dsl/hidden_input.rb
ariadne_view_components-0.0.71 lib/ariadne/forms/dsl/hidden_input.rb