application_helper.rb 254 B

12345678910
  1. module ApplicationHelper
  2. def bootstrap_class_for(flash_type)
  3. {
  4. success: "alert-success",
  5. error: "alert-danger",
  6. alert: "alert-warning",
  7. notice: "alert-info"
  8. }.stringify_keys[flash_type.to_s] || flash_type.to_s
  9. end
  10. end