Slight simplification
This commit is contained in:
parent
102ea7e67c
commit
0d6b50c232
1 changed files with 18 additions and 19 deletions
|
|
@ -1,21 +1,20 @@
|
||||||
// Display alert messages to the user
|
// Display alert messages to the user
|
||||||
|
|
||||||
- if flash
|
- flash.each do |name,msg|
|
||||||
- flash.each do |name,msg|
|
- case name
|
||||||
- case name
|
- when 'timedout'
|
||||||
- when 'timedout'
|
/ Workaround for Devise sometimes sending "true"
|
||||||
/ Workaround for Devise sometimes sending "true"
|
- next
|
||||||
- next
|
- when 'notice'
|
||||||
- when 'notice'
|
- cls='callout warning alert-callout-subtle radius'
|
||||||
- cls='callout warning alert-callout-subtle radius'
|
- when 'error'
|
||||||
- when 'error'
|
- cls='callout alert alert-callout-subtle radius'
|
||||||
- cls='callout alert alert-callout-subtle radius'
|
- else
|
||||||
- else
|
- cls='callout primary alert-callout-subtle radius'
|
||||||
- cls='callout primary alert-callout-subtle radius'
|
|
||||||
|
div class=cls data-closable=true
|
||||||
div class=cls data-closable=true
|
strong<
|
||||||
strong<
|
- if msg.is_a? Array
|
||||||
- if msg.is_a? Array
|
=safe_join(msg, "<br />".html_safe)
|
||||||
=safe_join(msg, "<br />".html_safe)
|
- else
|
||||||
- else
|
=msg
|
||||||
=msg
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue