Class: Twitter::Bootstrap::Components::V4::Flash

Inherits:
Base
  • Object
show all
Defined in:
app/components/twitter/bootstrap/components/v4/flash.rb

Class Method Summary collapse

Methods inherited from Base

#initialize, #perform

Constructor Details

This class inherits a constructor from Twitter::Bootstrap::Components::V4::Base

Class Method Details

.map_message_type_to_context(message_type) ⇒ Object



6
7
8
# File 'app/components/twitter/bootstrap/components/v4/flash.rb', line 6

def self.map_message_type_to_context(message_type)
  { success: "success", error: "danger", alert: "warning", notice: "info" }[message_type.to_sym] || message_type.to_s
end