From 9f1217c84372dc7da0df4ad88ca7e7a02587a327 Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Fri, 5 May 2017 13:59:32 +0200 Subject: [PATCH] FlashMessage: center flash message otherwise the #flash_message.center is useless --- app/views/layouts/_flash_messages.html.haml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/_flash_messages.html.haml b/app/views/layouts/_flash_messages.html.haml index a661dcdbd..730c11fde 100644 --- a/app/views/layouts/_flash_messages.html.haml +++ b/app/views/layouts/_flash_messages.html.haml @@ -1,7 +1,8 @@ -#flash_message.center -- if flash.notice - .alert.alert-success - = flash.notice -- if flash.alert - .alert.alert-danger - = flash.alert.html_safe +- if flash.notice.present? || flash.alert.present? + #flash_message.center + - if flash.notice.present? + .alert.alert-success + = flash.notice + - if flash.alert.present? + .alert.alert-danger + = flash.alert.html_safe