From f7b5800a1dc6a2a59758aea502a2ddb8f103634b Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Mon, 27 Mar 2017 14:51:28 +0900 Subject: Add a blank line between blocks --- app/finders/pipelines_finder.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/finders/pipelines_finder.rb') diff --git a/app/finders/pipelines_finder.rb b/app/finders/pipelines_finder.rb index 22507472e15..7935878d1d5 100644 --- a/app/finders/pipelines_finder.rb +++ b/app/finders/pipelines_finder.rb @@ -113,11 +113,13 @@ class PipelinesFinder else :id end + sort = if params[:sort] =~ /\A(ASC|DESC)\z/i params[:sort] else :desc end + items.order(order_by => sort) end end -- cgit v1.2.1