Skip to content

Commit

Permalink
Introduce ApplicationHelper#class_for_flash
Browse files Browse the repository at this point in the history
  • Loading branch information
Timrael committed Feb 21, 2013
1 parent df07be5 commit 1b7e387
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
module ApplicationHelper
def class_for_flash(name)
case name.to_s
when "notice"
"alert alert-info"
when "error"
"alert alert-error"
else
"alert"
end
end
end

0 comments on commit 1b7e387

Please sign in to comment.