Class: Playbook::PbForm::Form

Inherits:
KitBase
  • Object
show all
Defined in:
app/pb_kits/playbook/pb_form/form.rb

Instance Method Summary collapse

Methods inherited from KitBase

#object

Methods included from ZIndex

included

Methods included from Spacing

included, #max_width_options, #max_width_props, #max_width_values, #spacing_options, #spacing_props, #spacing_values

Methods included from Classnames

#generate_classname, #generate_classname_without_spacing, included

Methods included from Playbook::Props

#initialize, #prop

Methods included from Playbook::PbKitHelper

#pb_rails

Instance Method Details

#form_system_optionsObject



12
13
14
15
16
17
18
19
20
# File 'app/pb_kits/playbook/pb_form/form.rb', line 12

def form_system_options
  form_options = prop(:form_system_options)
  if form_options.is_a?(::Array)
    model, options = *form_options
    (options || {}).merge(model: model)
  else
    form_options
  end
end

#render_in(view_context, &block) ⇒ Object



22
23
24
# File 'app/pb_kits/playbook/pb_form/form.rb', line 22

def render_in(view_context, &block)
  form_kit.render_in(view_context, &block)
end