collectiveidea / awesome_nested_set

An awesome replacement for acts_as_nested_set and better_nested_set.
MIT License
2.39k stars 491 forks source link

Check if we should use unscoped #453

Closed p8 closed 3 years ago

p8 commented 3 years ago

In 6c5040c4c116cbff2bea69724972cff500f8334f Rails warnings were fixed.

It changed the implementation of lock_nodes_between from:

instance_base_class. ...

to basically the following:

instance_base_class.default_scoped. ...

Maybe unscoped is a better solution. This adds a check to see if the resulting SQL is similar to what it was before 6c5040c4c116cbff2bea69724972cff500f8334f

p8 commented 3 years ago

unscoped fails on Rails 6.1, Rails 6.0 and Rails 5.2, so that doesn't seem correct (or at least backwards compatible).