Sha256: 3413f520b8e0fd6b459a3a4f478cc9a95bb9fc664621b8a8fa9301135be55fb6

Contents?: true

Size: 422 Bytes

Versions: 43

Compression:

Stored size: 422 Bytes

Contents

module ApplicationHelper
  
  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
  
  def flash_messages
    flash.each do |flash_type, message|
      concat(content_tag(:div, message, class: "alert #{bootstrap_class_for(flash_type)}", role: 'alert'))
    end
    nil
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
mobile_workflow-0.7.7 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.7.6 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.7.5 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.7.4 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.7.3 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.7.2 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.7.1 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.7.0 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.31 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.30 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.29 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.28 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.27 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.26 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.25 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.24 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.23 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.22 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.21 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb
mobile_workflow-0.6.20 lib/generators/mobile_workflow/install/templates/app/helpers/application_helper.rb