projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8680153
)
5261: Fix {redirect_to @object} usage.
author
Tom Clegg <tom@curoverse.com>
Thu, 5 Mar 2015 20:09:11 +0000
(15:09 -0500)
committer
Tom Clegg <tom@curoverse.com>
Thu, 5 Mar 2015 20:09:11 +0000
(15:09 -0500)
apps/workbench/app/controllers/application_controller.rb
patch
|
blob
|
history
diff --git
a/apps/workbench/app/controllers/application_controller.rb
b/apps/workbench/app/controllers/application_controller.rb
index 0a13fa6b601d2d45a8eac3d0a18d0b2c951584e6..523ef7f7815d922e7009224d65cb5b2102eb1cd3 100644
(file)
--- a/
apps/workbench/app/controllers/application_controller.rb
+++ b/
apps/workbench/app/controllers/application_controller.rb
@@
-269,6
+269,9
@@
class ApplicationController < ActionController::Base
def redirect_to uri, *args
if request.xhr?
+ if not uri.is_a? String
+ uri = polymorphic_url(uri)
+ end
render json: {href: uri}
else
super