3400: Too much code that assumes it can call .first over and over without
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 5 Nov 2014 21:26:37 +0000 (16:26 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 5 Nov 2014 21:26:37 +0000 (16:26 -0500)
incurring an API call each time (silly).

apps/workbench/app/models/arvados_resource_list.rb

index 6c80c0299525241062c192818eeabd942ee405ab..eab2c51c8c92b9c489fab20e7878815af05508ea 100644 (file)
@@ -173,6 +173,10 @@ class ArvadosResourceList
     self
   end
 
+  def first
+    results.first
+  end
+
   def last
     results.last
   end