Fix inappropriate regex
This commit is contained in:
parent
56f50cbb3a
commit
a46c91f432
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue