Sha256: e6b7317127f577f536e84129df5e4f5c438fcd13b0b8471c8582eca6c8654667

Contents?: true

Size: 401 Bytes

Versions: 4

Compression:

Stored size: 401 Bytes

Contents

module BootstrapFlashHelper
  def bootstrap_flash
    output = ''
    flash.each do |type, message|
      output += flash_container(type, message)
    end

    raw(output)
  end

  def flash_container(type, message)
    raw(content_tag(:div, :class => "alert alert-#{type}") do
      content_tag(:a, raw("×"),:class => 'close', :data => {:dismiss => 'alert'}) +
      message
    end)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bootstrap-sass-extras-0.0.4 app/helpers/bootstrap_flash_helper.rb
bootstrap-sass-extras-0.0.3 app/helpers/bootstrap_flash_helper.rb
bootstrap-sass-extras-0.0.2 app/helpers/bootstrap_flash_helper.rb
bootstrap-sass-extras-0.0.1 app/helpers/bootstrap_flash_helper.rb