activerecord-bitemporal
activerecord-bitemporal copied to clipboard
Remove unneeded unscope values
Unscope values in the bitemporal_default_scope were introduced in this commit.
Since it is faster to build a query explicitly with a where clause than with a scope call, we hacked the unscope_values that Active Record uses internally and implemented overrides of valid_from/to and transaction_from/to.
However, in the next commit, where! is replaced by _valid_from_lteq and _valid_to_gt, which use rewhere. When using rewhere, there is no need to override the original condition by unscoped values, so this can simply be removed.