cancancan
cancancan copied to clipboard
Support combining scopes when loading records, use Arel instead of SQL
trafficstars
This refactors the ActiveRecordAdapter to use Arel/ActiveRecord to merge conditions. The advantage is that we can finally merge scopes from different abilities!
This only works with Rails versions 5.2+, so this PR would drop support for prior versions. Given that Rails 7 is about to come out, that's something at least worth considering.
I think this PR makes the ActiveRecord Adapter quite a bit more readable, which should make future contributions easier.
I know it's a big change. Thank you for your hard work on this gem.
Is there any news on this?