Module: Para::FormBuilder::Tabs

Defined in:
lib/para/form_builder/tabs.rb

Defined Under Namespace

Classes: Tab, TabsManager

Instance Method Summary collapse

Instance Method Details

#tabs(options = {}, &block) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/para/form_builder/tabs.rb', line 4

def tabs(options = {}, &block)
  manager = TabsManager.new(template, object, self, options)
  block.call(manager)
  manager.finalize!

  template.render partial: 'para/form/tabs', locals: { tabs_manager: manager, tabs: manager.tabs }
end