[#3477] Inline only use of variable
This commit is contained in:
parent
43243e73d4
commit
21128d94b6
1 changed files with 1 additions and 2 deletions
|
@ -75,7 +75,6 @@ class ProcedurePresentation < ApplicationRecord
|
|||
def sorted_ids(dossiers, gestionnaire)
|
||||
dossiers.each { |dossier| assert_matching_procedure(dossier) }
|
||||
table = sort['table']
|
||||
column = sanitized_column(sort)
|
||||
order = sort['order']
|
||||
|
||||
case table
|
||||
|
@ -96,7 +95,7 @@ class ProcedurePresentation < ApplicationRecord
|
|||
.pluck(:id)
|
||||
when 'self', 'user', 'individual', 'etablissement'
|
||||
return (table == 'self' ? dossiers : dossiers.includes(table))
|
||||
.order("#{column} #{order}")
|
||||
.order("#{sanitized_column(sort)} #{order}")
|
||||
.pluck(:id)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue