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)
	# Types: important, success, warning, error
  raw((:p, :class => "message #{type}") do
    message
  end)
end