demarches-normaliennes/app/views/layouts/_flash_messages.html.haml
2019-01-17 11:20:31 +01:00

14 lines
515 B
Text

#flash_messages
- if flash.any?
#flash_message.center
- flash.each do |key, value|
- sticky = defined?(sticky) ? sticky : false
- fixed = defined?(fixed) ? fixed : false
- if value.class == Array
.alert{ class: flash_class(key, sticky: sticky, fixed: fixed) }
- value.each do |message|
= sanitize(message)
%br
- else
.alert{ class: flash_class(key, sticky: sticky, fixed: fixed) }
= sanitize(value)