Only display flash notifications for :alert and :notice keys

This commit is contained in:
Marcin Kulik 2014-10-12 20:44:55 +02:00
parent 2f05b3875c
commit 53c2598c48
2 changed files with 5 additions and 1 deletions

View File

@ -73,4 +73,8 @@ module ApplicationHelper
Theme::AVAILABLE.invert
end
def flash_notifications
flash.select { |type, _| [:notice, :alert].include?(type.to_sym) }
end
end

View File

@ -1,3 +1,3 @@
- flash.each do |type, message|
- flash_notifications.each do |type, message|
section.flash[class=type]
.container = message