【Ruby on Rails】Foundation5 flash message with slim

app/views/layouts/_message.html.slim
- flash.each do |name, msg|
  - if msg.is_a?(String)
    div data-alert='' class="alert-box round #{name.to_s == 'notice' ? 'success' : 'alert'}"
      = content_tag :div, msg
      a href='#' class='close' ×
Created by Yuto at 2022-01-21 17:42
0
Like this article