When no limit is supplied, limit number of index results to 100.
authorWard Vandewege <ward@clinicalfuture.com>
Tue, 5 Feb 2013 01:44:19 +0000 (20:44 -0500)
committerWard Vandewege <ward@clinicalfuture.com>
Tue, 5 Feb 2013 01:44:19 +0000 (20:44 -0500)
app/controllers/application_controller.rb

index cc8b2c35e0c2946f71b3685d46aa637a23e6d397..738a07346b0008a86a8d77625e673977e88b8210 100644 (file)
@@ -83,6 +83,8 @@ class ApplicationController < ActionController::Base
       rescue
         raise "invalid argument (limit)"
       end
+    else
+      @objects = @objects.limit(100)
     end
     @objects.uniq!(&:id)
     if params[:eager] and params[:eager] != '0' and params[:eager] != 0 and params[:eager] != ''