Module: FlashHelper

Defined in:
lib/coadjutor/flash_helper.rb

Instance Method Summary collapse

Instance Method Details

#inline_flash_message(type, message) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/coadjutor/flash_helper.rb', line 2

def inline_flash_message(type, message)
  ###
  # We have to do it like this instead of with #content_tag because when
  # used with a decorator, #content_tag is an unknown method
  #
  # TODO: If Draper ever fixes this problem, this should be converted to
  # a #content_tag
  #
  <<-FLASHER.html_safe
    <div class="flash #{type}">
      <p class="flash_message">#{message}</p>
    </div>
  FLASHER
end