Sha256: 60748aa2f820a4774d4a6440cb60d7ad650982f22dbed303e70874ee30c2f90e
Contents?: true
Size: 858 Bytes
Versions: 197
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true # require_dependency "app/pb_kits/playbook/pb_form/form_builder" module Playbook module PbForm class Form include Playbook::Props clear_props prop :form_system, type: Playbook::Props::Enum, values: %w[form_with simple_form], default: "form_with" prop :form_system_options, type: Playbook::Props::Base prop :children, type: Playbook::Props::Proc prop :validate, type: Playbook::Props::Boolean, default: false delegate :to_partial_path, to: :specific_form delegate :merged_form_system_options, to: :specific_form delegate :form_builder, to: :specific_form private def specific_form @specific_form ||= "#{self.class}::#{form_system.classify}Form".constantize.new(self) end end end end
Version data entries
197 entries across 197 versions & 1 rubygems