Looping through flash


/ Published in: Rails
Save to your folder(s)

A quick and simple way of having any flash messages, from railscast #18


Copy this code and paste it in your HTML
  1. <% flash.each do |key, msg| %>
  2. <%= content_tag :div, msg, :id => key %>
  3. <% end %>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.