Merge branch '11917-dont-clear-cache'
[arvados.git] / apps / workbench / app / controllers / repositories_controller.rb
index 78ac055a8e748ca9f2ef18f4343f6023ceb2a93a..5ca6f22b02f54bf2ea3b213b7106717cd10c845b 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class RepositoriesController < ApplicationController
   before_filter :set_share_links, if: -> { defined? @object }
 
@@ -34,8 +38,8 @@ class RepositoriesController < ApplicationController
   end
 
   def all_repos
-    limit = if params[:limit] then params[:limit].to_i else 100 end
-    offset = if params[:offset] then params[:offset].to_i else 0 end
+    limit = params[:limit].andand.to_i || 100
+    offset = params[:offset].andand.to_i || 0
     @filters = params[:filters] || []
 
     if @filters.any?