Joined April 2014
·
Posted to
Ruby on Rails Flash messages with Bootstrap
over 1 year
ago
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
Forked
Have a project valued enough to be forked by someone else
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Charity
Fork and commit to someone's open source project in need
Mongoose
Have at least one original repo where Ruby is the dominant language
Raven
Have at least one original repo where some form of shell script is the dominant language
Really nice!