3114: bug fix: when rendering JSON response to a generic #show action, correctly...
[arvados.git] / apps / workbench / app / controllers / application_controller.rb
index 18397e10082737d27ad50fcaaae17bfb431f8285..e38a32df041eebf543d2821cea85c0d3b27fad15 100644 (file)
@@ -174,7 +174,7 @@ class ApplicationController < ActionController::Base
       return render_not_found("object not found")
     end
     respond_to do |f|
-      f.json { render json: @object.attributes.merge(href: url_for(@object)) }
+      f.json { render json: @object.attributes.merge(href: url_for(action: :show, id: @object)) }
       f.html {
         if params['tab_pane']
           comparable = self.respond_to? :compare