* Add flashes partial to DRY up admin/auth layouts
* Further consolidate flash messages
--- /dev/null
+# frozen_string_literal: true
+
+module FlashesHelper
+ def user_facing_flashes
+ flash.to_hash.slice('alert', 'error', 'notice', 'success')
+ end
+end
--- /dev/null
+- user_facing_flashes.each do |key, value|
+ .flash-message{class: key}
+ %strong= value
.content
%h2= yield :page_title
- - if flash[:notice]
- .flash-message.notice
- %strong= flash[:notice]
-
- - if flash[:alert]
- .flash-message.alert
- %strong= flash[:alert]
+ = render 'flashes'
= yield
= image_tag 'logo.png'
.form-container
- - if flash[:notice]
- .flash-message.notice
- %strong= flash[:notice]
-
- - if flash[:alert]
- .flash-message.alert
- %strong= flash[:alert]
+ = render 'flashes'
= yield