rtopitt/bolao2014

View on GitHub
app/helpers/application_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
module ApplicationHelper

  def css_class_for_flash_type(type)
    return '' if type.to_sym == :notice
    return 'warning' if type.to_sym == :alert
    return 'alert' if (type.to_sym == :error || type.to_sym == :failure)
    type.to_s
  end

  def current_filter
    ActiveSupport::StringInquirer.new(params[:filter].to_s)
  end

end