Fix crash if no search parameter given.
authorTom Clegg <tom@curoverse.com>
Mon, 13 Jan 2014 18:10:55 +0000 (10:10 -0800)
committerTom Clegg <tom@curoverse.com>
Mon, 13 Jan 2014 18:10:55 +0000 (10:10 -0800)
refs #1499

apps/workbench/app/controllers/collections_controller.rb

index f0e7765be5b11989e447f2d98273e2966391d78d..4b79a6dcb3299a894ced6310557bc6f89702aa38 100644 (file)
@@ -7,7 +7,7 @@ class CollectionsController < ApplicationController
   end
 
   def index
-    if params[:search].andand.length > 0
+    if params[:search].andand.length.andand > 0
       tags = Link.where(link_class: 'tag', any: ['contains', params[:search]])
       @collections = Collection.where(uuid: tags.collect(&:head_uuid))
     else