Module: FlashBlockHelper

Defined in:
app/helpers/flash_block_helper.rb

Instance Method Summary collapse

Instance Method Details

#flash_blockObject



2
3
4
5
6
7
8
9
# File 'app/helpers/flash_block_helper.rb', line 2

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

  raw(output)
end

#flash_container(type, message) ⇒ Object



11
12
13
14
15
16
# File 'app/helpers/flash_block_helper.rb', line 11

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