From 6a6c629da4ad1822e1f8a9e4fa7ca909074482c1 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Fri, 23 Jun 2017 17:56:09 +0630 Subject: [PATCH] update cancan alert message --- app/views/layouts/application.html.erb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1d4991e6..d2b57a7a 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -18,7 +18,16 @@ <%= render 'layouts/header' %>
<% flash.each do |type, message| %> -
+ <% + if type== "warning" + alert = "alert-warning" + elsif type== "notice" + alert = "alert-success" + else + alert = "alert-danger" + end + %> +
<%= message %>