Module: FlashMessenger::ViewHelper
- Includes:
- Helper
- Defined in:
- lib/flash-messenger/view_helper.rb
Instance Method Summary collapse
Methods included from Helper
#flash_alert, #flash_error, #flash_message, #flash_messenger, #flash_model_error, #flash_notice, #push_flash
Instance Method Details
#show_flash(*types) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/flash-messenger/view_helper.rb', line 7 def show_flash(*types) types = FlashMessenger::DefaultTypes if types.empty? types.each do |type| push_flash(flash[type], :type => type) unless flash[type].nil? end javascript_tag "flash.show(#{flash_messenger.to_json});" unless flash_messenger.empty? end |