Commit a46c91f4 authored by Shinya Maeda's avatar Shinya Maeda

Fix inappropriate regex

parent 56f50cbb
...@@ -101,7 +101,7 @@ class PipelinesFinder ...@@ -101,7 +101,7 @@ class PipelinesFinder
def order_and_sort(items) def order_and_sort(items)
if params[:order_by].present? && params[:sort].present? && if params[:order_by].present? && params[:sort].present? &&
items.column_names.include?(params[:order_by]) && 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]) items.reorder(params[:order_by] => params[:sort])
else else
items.reorder(id: :desc) items.reorder(id: :desc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment