Skip to content

Commit

Permalink
chore: fix metadata sorting on samples table
Browse files Browse the repository at this point in the history
  • Loading branch information
ericenns committed Dec 11, 2024
1 parent 0157293 commit d44a317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/sample/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def ransack_params
def sort_samples(scope = Sample.where(project_id: project_ids))
if column.starts_with? 'metadata_'
field = column.gsub('metadata_', '')
scope.order(Sample.metadata_sort(field, dir))
scope.order(Sample.metadata_sort(field, direction))
else
scope.order("#{column} #{direction}")
end
Expand Down

0 comments on commit d44a317

Please sign in to comment.