4024: rearrange partial handling
[arvados.git] / apps / workbench / app / controllers / pipeline_instances_controller.rb
index fa724b82b4480f1d481c35070442ad65d603f071..f5522ce360efea502a73f69de83a961f03eb6326 100644 (file)
@@ -287,6 +287,13 @@ class PipelineInstancesController < ApplicationController
   end
 
   def index
+    if params[:search].andand.length.andand > 0
+      @select ||= PipelineInstance.columns.map(&:name)
+      base_search = PipelineInstance.select(@select)
+      @objects = base_search.where(any: ['contains', params[:search]]).
+                              uniq { |pi| pi.uuid }
+    end
+
     @limit = 20
     super
   end