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

Development

Runtime

~> 1.10
~> 1.2
 Project Readme

CanCanCan-Squeel Build Status

[Code Climate] (https://codeclimate.com/github/lowjoel/cancancan-squeel) Coverage Status security Inline docs

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 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-squeel'

after you included cancancan.