From 6639ef8b5a2d0655a84888f3a227cbd33b92e175 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Tue, 11 Sep 2012 22:52:58 +0100 Subject: More concise flash output --- guides/source/action_controller_overview.textile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/guides/source/action_controller_overview.textile b/guides/source/action_controller_overview.textile index 1d43b44391..5806faed2a 100644 --- a/guides/source/action_controller_overview.textile +++ b/guides/source/action_controller_overview.textile @@ -308,12 +308,10 @@ The +destroy+ action redirects to the application's +root_url+, where the messag - <% if flash[:notice] %> -

<%= flash[:notice] %>

- <% end %> - <% if flash[:alert] %> -

<%= flash[:alert] %>

- <% end %> + <% flash.each do |name, msg| -%> + <%= content_tag :div, msg, class: name %> + <% end -%> + -- cgit v1.2.3