From 06deeab3c90707be7f86af3069259ac52d37c73f Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Fri, 2 May 2014 14:40:42 +0100 Subject: [PATCH] Display flash errors and notices --- public/style.css | 6 ++++++ views/layout.haml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/public/style.css b/public/style.css index 2e8d794..931355c 100644 --- a/public/style.css +++ b/public/style.css @@ -185,6 +185,12 @@ tr padding: 10px 25px; } +#notice { + background-color: green; + color: white; + padding: 10px 20px; +} + #error { background-color: red; color: white; diff --git a/views/layout.haml b/views/layout.haml index da22168..685a51a 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -8,6 +8,12 @@ %body #main + - if flash[:notice] + #notice + %p= flash[:notice] + - if flash[:error] + #error + %p= flash[:error] = yield #footer #footer_inner