Skip to content

Commit

Permalink
Remove redundant ELSE branch from the `ActiveRecord::Base.in_order_…
Browse files Browse the repository at this point in the history
…of` SQL query
  • Loading branch information
fatkodima committed Sep 14, 2022
1 parent 3d01986 commit 49c2342
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/query_methods.rb
Expand Up @@ -1785,7 +1785,7 @@ def build_case_for_value_position(column, values)
node.when(column.eq(value)).then(order)
end

Arel::Nodes::Ascending.new(node.else(values.length + 1))
Arel::Nodes::Ascending.new(node)
end

def resolve_arel_attributes(attrs)
Expand Down

0 comments on commit 49c2342

Please sign in to comment.