Skip to content
Snippets Groups Projects
Commit a46c91f4 authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Fix inappropriate regex

parent 56f50cbb
No related branches found
No related tags found
No related merge requests found
Loading
@@ -101,7 +101,7 @@ class PipelinesFinder
Loading
@@ -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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment