Sha256: 4199c8253a4ea72b8e8d7ac8864fbb531e9dddbefe719dbb6fef3945ec52f591

Contents?: true

Size: 325 Bytes

Versions: 133

Compression:

Stored size: 325 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Forms
    # :nodoc:
    class FormReference < BaseComponent
      delegate :builder, :form, to: :@input

      def initialize(input:)
        @input = input
      end

      def builder_or_view
        @input.nested? ? builder : @view_context
      end
    end
  end
end

Version data entries

133 entries across 133 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.35.1 lib/primer/forms/form_reference.rb
primer_view_components-0.26.1 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.35.0 lib/primer/forms/form_reference.rb
primer_view_components-0.26.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.34.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.33.2 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.33.1 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.33.0 lib/primer/forms/form_reference.rb
primer_view_components-0.25.1 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.32.1 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.32.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.29.1 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.29.0 lib/primer/forms/form_reference.rb
primer_view_components-0.23.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.28.1 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.28.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.27.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.26.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.25.1 lib/primer/forms/form_reference.rb
primer_view_components-0.22.0 lib/primer/forms/form_reference.rb