<% if Rails.configuration.workbench2_url %>
<li role="menuitem">
<%
- # Remove any trailing '/'
- r = /^(.*?)[\/]*$/
- wb2_url = r.match(Rails.configuration.workbench2_url)[1]
+ wb2_url = Rails.configuration.workbench2_url
+ wb2_url += '/' if wb2_url[-1] != '/'
+ wb2_url += 'token'
%>
- <form action="<%= wb2_url %>/token" method="GET">
+ <form action="<%= wb2_url %>" method="GET">
<input type="hidden" name="api_token" value="<%= Thread.current[:arvados_api_token] %>">
<button role="menuitem" type="submit">
<i class="fa fa-lg fa-share-square fa-fw"></i> Go to Workbench 2