Joined April 2014
·

Chris Seelus

IMEOS
·
Berlin
·
·

Really nice!

Since Rails 4.1 it does only work with strings for me, e.g.:

module ApplicationHelper
  def flash_class(level)
    case level
      when 'notice' then "alert alert-info"
      when 'success' then "alert alert-success"
      when 'error' then "alert alert-danger"
      when 'alert' then "alert alert-warning"
    end
  end
end
Achievements
54 Karma
0 Total ProTip Views
Interests & Skills