Sha256: 72009cf56c438229bfc40f122a12242ca617733b353aeac5b9cad39d483c037e
Contents?: true
Size: 606 Bytes
Versions: 5
Compression:
Stored size: 606 Bytes
Contents
module ActiveApplication module LayoutHelper def layout_flash html = Array.new flash.each do |key, msg| case key.to_s when "alert" flash_class = "alert-error" when "notice" flash_class = "alert-info" else flash_class = key.to_s end html << content_tag(:div, msg.html_safe + ' <a class="close" href="#" data-dismiss="alert">×</a>'.html_safe, class: ["fade", "in", "alert", flash_class], "data-alert" => "alert" ) end html.join.html_safe end end end
Version data entries
5 entries across 5 versions & 1 rubygems