Module: Padrino::Response::Notifiers::FlashNotifier

Defined in:
lib/padrino-response/notifiers/flash_notifier.rb

Class Method Summary collapse

Class Method Details

.say(app, kind, message, *args, &block) ⇒ Object

Saves specified message as flash notification with specified type.

Examples

notifier.say(self, :error, "Something went wrong")

… will save message to flash[:notice]



14
15
16
# File 'lib/padrino-response/notifiers/flash_notifier.rb', line 14

def self.say(app, kind, message, *args, &block)
  app.flash[kind.to_sym] = message
end