From: radhika Date: Fri, 30 Jun 2017 15:05:00 +0000 (-0400) Subject: 11870: minor updates X-Git-Tag: 1.1.0~162^2~4 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/30186c3f928d280e4af97a4989d7a82dfe68d592 11870: minor updates Arvados-DCO-1.1-Signed-off-by: Radhika Chippada --- diff --git a/apps/workbench/app/controllers/repositories_controller.rb b/apps/workbench/app/controllers/repositories_controller.rb index 78ac055a8e..37bc000c75 100644 --- a/apps/workbench/app/controllers/repositories_controller.rb +++ b/apps/workbench/app/controllers/repositories_controller.rb @@ -34,8 +34,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? diff --git a/apps/workbench/app/views/repositories/_show_help.html.erb b/apps/workbench/app/views/repositories/_show_help.html.erb index 0983d87385..afc7e5484f 100644 --- a/apps/workbench/app/views/repositories/_show_help.html.erb +++ b/apps/workbench/app/views/repositories/_show_help.html.erb @@ -1,7 +1,7 @@ <% filters = @filters + [["owner_uuid", "=", current_user.uuid]] - example = Repository.all.order("name ASC").limit(1).filter(filters).results.first - example = Repository.all.order("name ASC").limit(1).results.first if !example + example = Repository.all.order("name ASC").filter(filters).limit(1).results.first + example = Repository.all.order("name ASC").results.limit(1).first if !example %> <% if example %>