Fix return_to on generic "Create" button.
[arvados.git] / apps / workbench / app / views / application / _index.html.erb
index 0f6f5517744e8dfa86ba358eae68a6336c33917f..d12c401bc07539b18f206449f6ff8b9abd1a8d3c 100644 (file)
@@ -62,5 +62,5 @@
 <% end %>
 
 <% if controller.model_class.creatable? %>
-<%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", { action: 'create', return_to: './' }, { class: 'btn btn-primary' } %>
+<%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", { action: 'create', return_to: request.url }, { class: 'btn btn-primary' } %>
 <% end %>