Module: Spree::Admin::FlashHelper

Defined in:
app/helpers/spree/admin/flash_helper.rb

Instance Method Summary collapse

Instance Method Details

#admin_flash_class_for(flash_type) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'app/helpers/spree/admin/flash_helper.rb', line 4

def admin_flash_class_for(flash_type)
  {
    success: 'alert-success',
    error: 'alert-danger',
    warning: 'alert-warning',
    notice: 'alert-success',
    alert: 'alert-danger'
  }[flash_type.to_sym]
end