Module: ProgressBarHelper

Defined in:
app/helpers/progress_bar_helper.rb

Defined Under Namespace

Classes: ProgressBarCreator

Instance Method Summary collapse

Instance Method Details

#progress_bar(bars_or_options = nil, options = {}) ⇒ Object



63
64
65
66
67
68
69
70
71
# File 'app/helpers/progress_bar_helper.rb', line 63

def progress_bar(bars_or_options=nil, options={})
  bars = bars_or_options.is_a?(Hash) ? [bars_or_options] : bars_or_options

  prepend_class(options, 'progress')

   :div, options do
    bars.map { |bar| ProgressBarCreator.new(bar).render }.join('').html_safe
  end
end