2760: Make a new/empty name link to show/edit if no existing name is found.
[arvados.git] / apps / workbench / app / controllers / application_controller.rb
index 353a18802652f33f82fc43d9b0288ff04c3aefe8..78df2206a1a8ccd32da9166880fd3247fee2835d 100644 (file)
@@ -127,6 +127,9 @@ class ApplicationController < ActionController::Base
       f.json { render json: @object.attributes.merge(href: url_for(@object)) }
       f.html {
         if request.method == 'GET'
+          @name_link ||= Link.new(link_class: 'name',
+                                  tail_uuid: current_user.uuid,
+                                  head_uuid: @object.uuid)
           render
         elsif params[:return_to]
           redirect_to params[:return_to]