From 532bec6e564884c2bd5b2bcc7cab929f4f2cabf5 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Sat, 22 Apr 2017 22:22:34 -0400 Subject: Clean up flash display in views (#2336) * Add flashes partial to DRY up admin/auth layouts * Further consolidate flash messages --- app/helpers/flashes_helper.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/helpers/flashes_helper.rb (limited to 'app/helpers') diff --git a/app/helpers/flashes_helper.rb b/app/helpers/flashes_helper.rb new file mode 100644 index 000000000..6c5e93709 --- /dev/null +++ b/app/helpers/flashes_helper.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +module FlashesHelper + def user_facing_flashes + flash.to_hash.slice('alert', 'error', 'notice', 'success') + end +end -- cgit