Method: Alchemy::BaseHelper#render_message
- Defined in:
- app/helpers/alchemy/base_helper.rb
#render_message(type = :info, msg = nil) ⇒ Object
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 %>
37 38 39 |
# File 'app/helpers/alchemy/base_helper.rb', line 37 def (type = :info, msg = nil, &) render Alchemy::Admin::Message.new(msg || capture(&), type: type) end |