Skip to content

Commit a8b8eda

Browse files
committed
fix order
1 parent 72e38ca commit a8b8eda

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/motor/api_query/sort.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ def build_arel_order(model, param)
4545

4646
arel_column = reflection_model.arel_table[field]
4747

48-
arel_direction = direction.present? ? arel_column.desc : arel_column.asc
49-
50-
maybe_add_null_last(model, arel_direction)
48+
direction.present? ? arel_column.desc : maybe_add_null_last(model, arel_column.asc)
5149
end
5250
end
5351

lib/motor/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Motor
4-
VERSION = '0.4.36'
4+
VERSION = '0.4.37'
55
end

0 commit comments

Comments
 (0)