mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
Merge pull request #3329 from aignatov-bio/ai-sci-5727-fix-results-sorting
Change results sorting [SCI-5727]
This commit is contained in:
commit
7556a54213
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue