Fix get_n_objects_of only accepts ArvadosBase classes, not any class. no issue #
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 24 Jun 2014 13:11:08 +0000 (09:11 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 24 Jun 2014 13:11:08 +0000 (09:11 -0400)
apps/workbench/app/controllers/application_controller.rb

index 22a5c49e0f0c1bce0b4cafb2d906286010029705..ec2e95afd2ed065530459d25baf00a0f87d2ba6d 100644 (file)
@@ -735,7 +735,7 @@ class ApplicationController < ActionController::Base
   def get_n_objects_of_class dataclass, size
     @objects_map_for ||= {}
 
-    raise ArgumentError, 'Argument is not a data class' unless dataclass.is_a? Class
+    raise ArgumentError, 'Argument is not a data class' unless dataclass.is_a? ArvadosBase
     raise ArgumentError, 'Argument is not a valid limit size' unless (size && size>0)
 
     # if the objects_map_for has a value for this dataclass, and the