helpers: handle flash[:error]

Errors generated by the `invisible-catcha` gem are reported as
`flash[:error]` (which differs from Rail's usual `flash[:alert]`).

We probably shouldn't use flash[:error] in our own codebase; but we can
handle its use in third-party libraries.
This commit is contained in:
Pierre de La Morinerie 2022-01-06 13:21:47 +01:00
parent 68b112e00a
commit 2e1a3c32cb
2 changed files with 2 additions and 1 deletions

View file

@ -13,7 +13,7 @@ module ApplicationHelper
case level
when 'notice'
class_names << 'alert-success'
when 'alert'
when 'alert', 'error'
class_names << 'alert-danger'
end