def render_message(type = :info, msg = nil, &blk)
      icon_class = message_icon_class(type)
      if block_given?
        content_tag :div, render_icon(icon_class) + capture(&blk), class: "#{type} message"
      else
        content_tag :div, render_icon(icon_class) + msg, class: "#{type} message"
      end
    end
def render_message(type = :info, msg = nil, &blk)
      icon_class = message_icon_class(type)
      if block_given?
        content_tag :div, render_icon(icon_class) + capture(&blk), class: "#{type} message"
      else
        content_tag :div, render_icon(icon_class) + msg, class: "#{type} message"
      end
    end
Returns a div with an icon and the passed content
 The default message type is info, but you can also pass
 other types like :warning or :error

 === Usage:

   <%= render_message :warning do
     <p>Caution! This is a warning!</p>
   <% end %>