cancancan icon indicating copy to clipboard operation
cancancan copied to clipboard

Support combining scopes when loading records, use Arel instead of SQL

Open mamhoff opened this issue 4 years ago • 2 comments
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.

mamhoff avatar Jun 28 '21 11:06 mamhoff

Is there any news on this?

23tux avatar Sep 26 '22 12:09 23tux