From: Tom Clegg Date: Mon, 18 Aug 2014 20:51:13 +0000 (-0400) Subject: 3114: Fix href in json response for generic #create action too. See 7485476. X-Git-Tag: 1.1.0~2314^2~3 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/f7768d3dbc6e4c4fa56cbe4906d6682120b8daa3?hp=-c 3114: Fix href in json response for generic #create action too. See 7485476. --- f7768d3dbc6e4c4fa56cbe4906d6682120b8daa3 diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index e38a32df04..160730331d 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -248,7 +248,7 @@ class ApplicationController < ActionController::Base @object ||= model_class.new @new_resource_attrs, params["options"] if @object.save 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 { redirect_to @object }