Sha256: 49921b81c6f7c8510b57fb99688f131bec188b1b708c9228de75a8296d0caae2

Contents?: true

Size: 316 Bytes

Versions: 111

Compression:

Stored size: 316 Bytes

Contents

# frozen_string_literal: true

module Primer
  # :nodoc:
  module Forms
    def self.inline_form(builder, base = nil, &block)
      base ||= defined?(ApplicationForm) ? ApplicationForm : Primer::Forms::Base

      klass = Class.new(base) do
        form(&block)
      end

      klass.new(builder)
    end
  end
end

Version data entries

111 entries across 111 versions & 2 rubygems

Version Path
primer_view_components-0.30.0 lib/primer/forms.rb
openproject-primer_view_components-0.39.1 lib/primer/forms.rb
openproject-primer_view_components-0.39.0 lib/primer/forms.rb
openproject-primer_view_components-0.38.0 lib/primer/forms.rb
primer_view_components-0.29.0 lib/primer/forms.rb
primer_view_components-0.28.0 lib/primer/forms.rb
openproject-primer_view_components-0.37.1 lib/primer/forms.rb
openproject-primer_view_components-0.37.0 lib/primer/forms.rb
openproject-primer_view_components-0.36.2 lib/primer/forms.rb
openproject-primer_view_components-0.36.1 lib/primer/forms.rb
openproject-primer_view_components-0.36.0 lib/primer/forms.rb
primer_view_components-0.27.0 lib/primer/forms.rb
openproject-primer_view_components-0.35.2 lib/primer/forms.rb
openproject-primer_view_components-0.35.1 lib/primer/forms.rb
primer_view_components-0.26.1 lib/primer/forms.rb
openproject-primer_view_components-0.35.0 lib/primer/forms.rb
primer_view_components-0.26.0 lib/primer/forms.rb
openproject-primer_view_components-0.34.0 lib/primer/forms.rb
openproject-primer_view_components-0.33.2 lib/primer/forms.rb
openproject-primer_view_components-0.33.1 lib/primer/forms.rb