def bootstrap_progressbar_tag(*args)
      percentage = args[0].to_i
      options = args[1] || {}
      options.stringify_keys!
      options['title'] ||= "#{percentage}%"

      classes = ['progress']
      classes << options.delete('class')
      classes << 'progress-striped'

      type = options.delete('type').to_s
      type = " progress-bar-#{type}" unless type.blank?

      # Animate the progress bar unless something has broken:
      classes << 'active' unless type == 'danger'

      inner = content_tag(:div, '', class: "progress-bar#{type}", style: "width:#{percentage}%")

      options['class'] = classes.compact.join(' ')
      content_tag(:div, inner, options)
    end
def bootstrap_progressbar_tag(*args)
      percentage = args[0].to_i
      options = args[1] || {}
      options.stringify_keys!
      options['title'] ||= "#{percentage}%"

      classes = ['progress']
      classes << options.delete('class')
      classes << 'progress-striped'

      type = options.delete('type').to_s
      type = " progress-bar-#{type}" unless type.blank?

      # Animate the progress bar unless something has broken:
      classes << 'active' unless type == 'danger'

      inner = content_tag(:div, '', class: "progress-bar#{type}", style: "width:#{percentage}%")

      options['class'] = classes.compact.join(' ')
      content_tag(:div, inner, options)
    end
Creates a Boostrap progress bar.

 ==== Signatures

   bootstrap_progressbar_tag(options)

 ==== Examples

   <%= bootstrap_progressbar_tag(40) %>
   # => <div class="progress progress-striped active" title="40%"><div class="progress-bar"
   style="width:40%"></div></div>

   <%= bootstrap_progressbar_tag(40), type: :danger %>
   # => <div class="progress progress-striped active" title="40%"><div
   class="progress-bar progress-bar-danger" style="width:40%"></div></div>

 ==== Browser compatibility

 Bootstrap Progress bars use CSS3 gradients, transitions, and animations to achieve all their
 effects. These features are not supported in IE7-9 or older versions of Firefox.
 Versions earlier than Internet Explorer 10 and Opera 12 do not support animations.