Method: ApplicationHelper#flash_tag
- Defined in:
- lib/generators/tmatt_cms/templates/helpers/application_helper.rb
#flash_tag ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/tmatt_cms/templates/helpers/application_helper.rb', line 2 def flash_tag return '' if flash.blank? html = '' flash.each do |name, msg| if msg.is_a?(String) html << "<div class='action-alert alert alert-#{name} text-center m-c'>" html << "<button type='button' class='close action-alert-close'>×</button>" html << "#{msg}" html << '</div>' end end raw html end |