Something like below should do the work:
-flash.each do |key, value|
div class="alert alert-#{key}"
= value
Pregunta
hogehoge.html.erb
<% flash.each do |key, value| %>
<div class="alert alert-<%= key %>"><%= value %></div>
<% end %>
I want to transrate into
hogehoge.html.slim
can anybody help me?
Solución
Something like below should do the work:
-flash.each do |key, value|
div class="alert alert-#{key}"
= value
Otros consejos
- flash.each do |key, value|
div class="alert alert-#{key}"
= value