3235: Merge branch 'master' into 3235-top-nav-site-search
[arvados.git] / apps / workbench / app / helpers / application_helper.rb
index c3856c2f299bfb0747d7cc81d5394338e9a67547..1b186c5420fc85739559fe0fabbf8bb20204bf93 100644 (file)
@@ -428,4 +428,13 @@ module ApplicationHelper
       RESOURCE_CLASS_ICONS.fetch(class_name, default)
     end
   end
+
+  def chooser_preview_url_for object
+    case object.class.to_s
+    when 'Collection'
+      polymorphic_path(object, tab_pane: 'chooser_preview')
+    else
+      nil
+    end
+  end
 end