Only display flash notifications for :alert and :notice keys
This commit is contained in:
parent
2f05b3875c
commit
53c2598c48
@ -73,4 +73,8 @@ module ApplicationHelper
|
||||
Theme::AVAILABLE.invert
|
||||
end
|
||||
|
||||
def flash_notifications
|
||||
flash.select { |type, _| [:notice, :alert].include?(type.to_sym) }
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -1,3 +1,3 @@
|
||||
- flash.each do |type, message|
|
||||
- flash_notifications.each do |type, message|
|
||||
section.flash[class=type]
|
||||
.container = message
|
||||
|
Loading…
Reference in New Issue
Block a user