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:
parent
68b112e00a
commit
2e1a3c32cb
2 changed files with 2 additions and 1 deletions
|
@ -13,7 +13,7 @@ module ApplicationHelper
|
|||
case level
|
||||
when 'notice'
|
||||
class_names << 'alert-success'
|
||||
when 'alert'
|
||||
when 'alert', 'error'
|
||||
class_names << 'alert-danger'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue