Handle single and multiple flash messages correctly

This commit is contained in:
Christoph Haas 2020-11-23 00:21:52 +01:00
parent 7788025cf7
commit 0aa959be84

View file

@ -7,11 +7,15 @@
/ Workaround for Devise sometimes sending "true"
- next
- when 'notice'
.callout.warning.alert-callout-subtle.radius data-closable=true
strong< = safe_join(msg, "<br />".html_safe)
- cls='callout warning alert-callout-subtle radius'
- when 'error'
.callout.alert.alert-callout-subtle.radius data-closable=true
strong< = safe_join(msg, "<br />".html_safe)
- cls='callout alert alert-callout-subtle radius'
- else
.callout.primary.alert-callout-subtle.radius data-closable=true
strong< = safe_join(msg, "<br />".html_safe)
- cls='callout primary alert-callout-subtle radius'
div class=cls data-closable=true
strong<
- if msg.is_a? Array
=safe_join(msg, "<br />".html_safe)
- else
=msg