Module: ToolbarHelper

Defined in:
app/helpers/toolbar_helper.rb

Defined Under Namespace

Classes: Toolbar

Instance Method Summary collapse

Instance Method Details

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

Build a tool bar composed of tool groups composed of tool


104
105
106
107
108
109
110
111
112
113
# File 'app/helpers/toolbar_helper.rb', line 104

def toolbar(options = {}, &block)
  return nil unless block_given?

  html = capture(Toolbar.new(self), &block)

  unless options[:wrap].is_a?(FalseClass)
    html = (:div, html, class: 'toolbar' + (options[:class] ? ' ' << options[:class].to_s : ''))
  end
  html
end