diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-01 09:58:06 +0300 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-02 20:11:50 +0300 |
commit | fd302061f915f535b2dd419d5a76efb76ab534be (patch) | |
tree | c982fbf7d0a26336b63c395978c1cad9d978700c /app/finders | |
parent | df834306c1794ed72d6d655c7941dee28f7e85c7 (diff) |
Fix rubocop offences and rspec failures
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/pipelines_finder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/pipelines_finder.rb b/app/finders/pipelines_finder.rb index ff16d7305ad..4a44a469a48 100644 --- a/app/finders/pipelines_finder.rb +++ b/app/finders/pipelines_finder.rb @@ -101,8 +101,8 @@ class PipelinesFinder def order_and_sort(items) if params[:order_by].present? && params[:sort].present? && - items.column_names.include?(params[:order_by]) && - (params[:sort].downcase == 'asc' || params[:sort].downcase == 'desc') + items.column_names.include?(params[:order_by]) && + (params[:sort].casecmp('ASC') || params[:sort].casecmp('DESC')) items.order("#{params[:order_by]} #{params[:sort]}") else items.order(id: :desc) |