From 41f3658885062525b4f389ac626a1365d951af77 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Tue, 12 Aug 2014 16:43:45 -0400 Subject: [PATCH] 3354: Redirect link#show to "show named object". This way, if you put a text link like "foo":{uuid-of-name-link} in a textile description field, it leads to the named object rather than the generic "show attributes" page for the link object. --- apps/workbench/app/controllers/links_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/workbench/app/controllers/links_controller.rb b/apps/workbench/app/controllers/links_controller.rb index 78529c149a..fd51fb1616 100644 --- a/apps/workbench/app/controllers/links_controller.rb +++ b/apps/workbench/app/controllers/links_controller.rb @@ -1,2 +1,9 @@ class LinksController < ApplicationController + def show + if @object.link_class == 'name' and + Collection == ArvadosBase::resource_class_for_uuid(@object.head_uuid) + return redirect_to collection_path(@object.uuid) + end + super + end end -- 2.39.5