Skip to content

Compact order values

euko requested to merge simple-order-builder-compact-nil-order-values into master

What does this MR do and why?

  • Compact order_values of a scope in SimpleOrderBuilder class.

Because of default_scope used in some models, SimpleOrderBuilder cannot properly pick up order values.

Example: when a model has a default scope reorder(nil) does not actually remove nil.

> Event.reorder(nil).order_values
=> [nil]

Related to #323730 (closed).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by euko

Merge request reports

Loading