Module: Playbook::PbKitHelper

Includes:
PbFormsHelper
Included in:
KitBase
Defined in:
lib/playbook/pb_kit_helper.rb

Instance Method Summary collapse

Methods included from PbFormsHelper

#pb_form_with

Instance Method Details

#pb_rails(kit_name, props: {}, &block) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/playbook/pb_kit_helper.rb', line 7

def pb_rails(kit_name, props: {}, &block)
  kit = Playbook::KitResolver.resolve(kit_name.to_s)

  if respond_to? :render_component
    render_component kit.new(props, &block), &block
  else
    render kit.new(props, &block), &block
  end
end