Merge pull request #3329 from aignatov-bio/ai-sci-5727-fix-results-sorting

Change results sorting [SCI-5727]
This commit is contained in:
Alex Kriuchykhin 2021-05-18 14:48:43 +02:00 committed by GitHub
commit 7556a54213
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -244,10 +244,10 @@ class MyModulesController < ApplicationController
@results = @results.page(params[:page]).per(Constants::RESULTS_PER_PAGE_LIMIT)
@results = case @results_order
when 'old' then @results.order(created_at: :asc)
when 'old' then @results.order(updated_at: :asc)
when 'atoz' then @results.order(name: :asc)
when 'ztoa' then @results.order(name: :desc)
else @results.order(created_at: :desc)
else @results.order(updated_at: :desc)
end
end