Module: ApplicationHelper
- Defined in:
- lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#bootstrap_class_for(flash_type) ⇒ Object
4 5 6 |
# File 'lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb', line 4 def bootstrap_class_for(flash_type) { success: "alert-success", error: "alert-danger", alert: "alert-warning", notice: "alert-info" }.stringify_keys[flash_type.to_s] || flash_type.to_s end |
#flash_messages ⇒ Object
8 9 10 11 12 13 |
# File 'lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb', line 8 def flash.each do |flash_type, | concat(content_tag(:div, , class: "alert #{bootstrap_class_for(flash_type)}", role: 'alert')) end nil end |