21 lines
355 B
Ruby
21 lines
355 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ApplicationHelper
|
|
include Pagy::Frontend
|
|
|
|
def bootstrap_class_for_flash(flash_type)
|
|
case flash_type
|
|
when 'success'
|
|
'alert-success'
|
|
when 'error'
|
|
'alert-danger'
|
|
when 'alert'
|
|
'alert-warning'
|
|
when 'notice'
|
|
'alert-primary'
|
|
else
|
|
'alert-secondary'
|
|
end
|
|
end
|
|
end
|