Module: LocaleFlash::ActionView

Included in:
ActionView::Base
Defined in:
lib/locale_flash/action_view.rb

Instance Method Summary collapse

Instance Method Details

#locale_flashObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/locale_flash/action_view.rb', line 4

def locale_flash
  output = ''
  flash.each do |key, value|
    if value.is_a?(Hash) && value[:controller] && value[:action]
      output << locale_flash_wrap(key, t(locale_flash_key(key, value), :default => locale_flash_default(key, value)))
    else
      output << locale_flash_wrap(key, value)
    end
  end
  output
end