No commit activity in last 3 years
No release in over 3 years
Implements CanCanCan's rule-based record fetching using BabySqueel.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
>= 0
~> 3.0

Runtime

< 5.2.1, >= 4.1
>= 1.1.5
>= 1.10
 Project Readme

CanCanCan-BabySqueel

This is an adapter for the CanCanCan authorisation library to automatically generate SQL queries from ability rules.

This differs from the default ActiveRecord implementation in that it uses baby_squeel to generate SQL queries. This no longer uses

  • includes (which incurs eager loading overhead)
  • WHERE fragments, joined lexically using OR or AND or NOT.

As a side effect of using squeel, this allows self-joins in rule definitions.

Usage

In your Gemfile, insert the following line:

gem 'cancancan-baby_squeel'

after you included cancancan.