Fix inappropriate regex

This commit is contained in:
Shinya Maeda 2017-03-08 17:33:10 +09:00
parent 56f50cbb3a
commit a46c91f432

View file

@ -101,7 +101,7 @@ class PipelinesFinder
def order_and_sort(items)
if params[:order_by].present? && params[:sort].present? &&
items.column_names.include?(params[:order_by]) &&
params[:sort] =~ /\A(ASC|DESC)\Z/i
params[:sort] =~ /\A(ASC|DESC)\z/i
items.reorder(params[:order_by] => params[:sort])
else
items.reorder(id: :desc)