Browse Source
* Add flashes partial to DRY up admin/auth layouts * Further consolidate flash messagespull/5/head
4 changed files with 12 additions and 14 deletions
@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true |
||||
|
||||
module FlashesHelper |
||||
def user_facing_flashes |
||||
flash.to_hash.slice('alert', 'error', 'notice', 'success') |
||||
end |
||||
end |
||||
@ -0,0 +1,3 @@
|
||||
- user_facing_flashes.each do |key, value| |
||||
.flash-message{class: key} |
||||
%strong= value |
||||
Loading…
Reference in new issue