diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6dab913..db046da 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -73,4 +73,8 @@ module ApplicationHelper Theme::AVAILABLE.invert end + def flash_notifications + flash.select { |type, _| [:notice, :alert].include?(type.to_sym) } + end + end diff --git a/app/views/shared/_flash.html.slim b/app/views/shared/_flash.html.slim index a95e873..8f723e7 100644 --- a/app/views/shared/_flash.html.slim +++ b/app/views/shared/_flash.html.slim @@ -1,3 +1,3 @@ -- flash.each do |type, message| +- flash_notifications.each do |type, message| section.flash[class=type] .container = message