Sha256: 4199c8253a4ea72b8e8d7ac8864fbb531e9dddbefe719dbb6fef3945ec52f591

Contents?: true

Size: 325 Bytes

Versions: 134

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

134 entries across 134 versions & 2 rubygems

Version Path
primer_view_components-0.22.0 lib/primer/forms/form_reference.rb
primer_view_components-0.21.1 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.25.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.24.0 lib/primer/forms/form_reference.rb
primer_view_components-0.21.0 lib/primer/forms/form_reference.rb
primer_view_components-0.20.1 lib/primer/forms/form_reference.rb
primer_view_components-0.20.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.23.0 lib/primer/forms/form_reference.rb
primer_view_components-0.19.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.22.2 lib/primer/forms/form_reference.rb
primer_view_components-0.18.2 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.22.1 lib/primer/forms/form_reference.rb
primer_view_components-0.18.1 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.22.0 lib/primer/forms/form_reference.rb
primer_view_components-0.18.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.21.0 lib/primer/forms/form_reference.rb
primer_view_components-0.17.0 lib/primer/forms/form_reference.rb
openproject-primer_view_components-0.20.0 lib/primer/forms/form_reference.rb
primer_view_components-0.16.1 lib/primer/forms/form_reference.rb
primer_view_components-0.16.0 lib/primer/forms/form_reference.rb