X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9e111d1d284d6915a3c5f3c1a83b55eeee21c12d..0b187b107128a57c1f0c00057d39979ab53d4137:/apps/workbench/app/views/application/_title_and_buttons.html.erb diff --git a/apps/workbench/app/views/application/_title_and_buttons.html.erb b/apps/workbench/app/views/application/_title_and_buttons.html.erb index 31ff2e6e21..398f248a39 100644 --- a/apps/workbench/app/views/application/_title_and_buttons.html.erb +++ b/apps/workbench/app/views/application/_title_and_buttons.html.erb @@ -52,15 +52,17 @@ <% end %> <% end %> -<% - # Display any flash messages in an alert. If there is any entry with "error" key, alert-danger is used. - flash_msg = '' - flash_msg_is_error = false - flash.each do |msg| - flash_msg_is_error ||= (msg[0]=='error') - flash_msg += ('
' + msg[1] + '
') - end - if flash_msg != '' -%> - +<% unless flash["error"].blank? %> + +<% flash.delete("error") %> +<% end %> + +<% unless flash.empty? %> + <% end %>