Joined April 2014
·
C20770a8670d0060b6ff022a8042d9a1

Chris Seelus

IMEOS
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