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-7.16.0.pre.alpha5 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.16.0.pre.alpha4 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.16.0.pre.alpha3 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.16.0.pre.alpha2 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.16.0.pre.alpha1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.14.0.pre.alpha1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.16.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.15.1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.15.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.14.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.13.0.pre.alpha1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.13.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.12.1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.12.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.11.1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.11.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.10.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.9.0 app/pb_kits/playbook/pb_form/form/form_with_form.rb
playbook_ui-7.8.4 app/pb_kits/playbook/pb_form/form/form_with_form.rb