Module: QUI::Toolbar::MainHelper
- Defined in:
- lib/qui-toolbar-main-helper.rb
Instance Method Summary collapse
Instance Method Details
#toolbar(options = {}, &b) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/qui-toolbar-main-helper.rb', line 4 def ( = {}, &b) @toolbar_count ||= 0 raise RuntimeError, "@toolbar_count must be integer" unless @toolbar_count.is_a? Fixnum contents = capture do yield QUI::Toolbar::Base.new b.binding end [:html_options] ||= {} [:html_options][:id] ||= "toolbar_#{@toolbar_count}" @toolbar_count += 1 concat content_tag(:div, contents, [:html_options].merge({:class => "toolbar"})) end |