Module: Outpost::Controller::Helpers

Extended by:
ActiveSupport::Concern
Defined in:
lib/outpost/controller/helpers.rb

Instance Method Summary collapse

Instance Method Details

#notice(message) ⇒ Object

Public: Set the flash message, only for HTML requests.

message - (String) The message to add to the flash.

Examples

notice("Success")
flash[:notice]
# => "Success"

Returns nothing.



19
20
21
# File 'lib/outpost/controller/helpers.rb', line 19

def notice(message)
  flash[:notice] = message if request.format.html?
end