Sha256: 71d513ea0f2aba03b2dcbd331ddde9bae7c7406ffcee03bfd5e232dc66995cde

Contents?: true

Size: 369 Bytes

Versions: 14

Compression:

Stored size: 369 Bytes

Contents

module Chaltron::LogsHelper
  def display_panel(log, &block)
    klass = "panel panel-#{bootstrap_severity(log.severity)}"
    content_tag :div, capture(&block), class: klass
  end

  def bootstrap_severity(severity)
    case severity.to_s
    when 'info'  then 'primary'
    when 'error' then 'danger'
    when 'debug' then 'info'
    else 'default'
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
chaltron-0.2.6 app/helpers/chaltron/logs_helper.rb
chaltron-0.2.5 app/helpers/chaltron/logs_helper.rb
chaltron-0.2.4 app/helpers/chaltron/logs_helper.rb
chaltron-0.2.3 app/helpers/chaltron/logs_helper.rb
chaltron-0.2.2 app/helpers/chaltron/logs_helper.rb
chaltron-0.2.1 app/helpers/chaltron/logs_helper.rb
chaltron-0.2.0 app/helpers/chaltron/logs_helper.rb
chaltron-0.1.6 app/helpers/chaltron/logs_helper.rb
chaltron-0.1.5 app/helpers/chaltron/logs_helper.rb
chaltron-0.1.4 app/helpers/chaltron/logs_helper.rb
chaltron-0.1.3 app/helpers/chaltron/logs_helper.rb
chaltron-0.1.2 app/helpers/chaltron/logs_helper.rb
chaltron-0.1.1 app/helpers/chaltron/logs_helper.rb
chaltron-0.1.0 app/helpers/chaltron/logs_helper.rb