diff options
author | Azul <azul@leap.se> | 2012-12-07 13:00:44 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-12-07 13:59:00 +0100 |
commit | 85be030a434cfab4b7728e4883624d362ec7afbd (patch) | |
tree | dadeba674b52640495073fc58d405c23c7528738 /app/views/layouts | |
parent | 4aff08fe9696d2f6b92f8a8c2bbb2f96a26277e7 (diff) |
first stub at displaying success messages
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_messages.html.haml | 5 | ||||
-rw-r--r-- | app/views/layouts/application.html.haml | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml new file mode 100644 index 0000000..80e34d4 --- /dev/null +++ b/app/views/layouts/_messages.html.haml @@ -0,0 +1,5 @@ +- flash.each do |name, msg| + - if msg.is_a?(String) + %div{:class => "alert alert-#{name == :notice ? "success" : "error"}"} + %a.close{"data-dismiss" => "alert"} × + = content_tag :div, msg, :id => "flash_#{name}" diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a57d65e..e6d22f0 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -18,6 +18,6 @@ .content .row .span12 - //= render 'layouts/messages' + = render 'layouts/messages' = yield %footer |