Sha256: 64fb7e556cf9c27ae454a0f5417cc87d4623ac080db18511185637e009a5b730

Contents?: true

Size: 814 Bytes

Versions: 192

Compression:

Stored size: 814 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbForm
    class Form
      class FormWithForm
        def initialize(form)
          self.form = form
        end

        def to_partial_path
          "pb_form/form_form_with"
        end

        def merged_form_system_options
          Hash(form_system_options).merge(
            class: merged_class,
            data: { "pb-form-validation": validate }.merge(Hash(form_system_options).fetch(:data, {})),
            builder: form_builder
          )
        end

      private

        attr_accessor :form

        delegate_missing_to :form

        def merged_class
          "pb-form #{Hash(form_system_options)[:class]}".strip
        end

        def form_builder
          FormBuilder::FormWithFormBuilder
        end
      end
    end
  end
end

Version data entries

192 entries across 192 versions & 1 rubygems

Version Path
playbook_ui-6.4.1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.0.0.pre.alpha5 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.4.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.3.1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.0.0.pre.alpha4 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.0.0.pre.alpha3 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.0.0.pre.alpha2 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.3.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.2.1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.2.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.0.0.pre.alpha1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.1.0.pre.alpha5 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.1.0.pre.alpha4 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.1.0.pre.alpha3 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.1.0.pre.alpha2 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.1.0.pre.alpha1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.1.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.0.1.pre.alpha6 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-6.0.1.pre.alpha5 app/pb_kits/playbook/pb_form/form/form_with_form.rb