Skip to content

Coursemology/cancancan-baby_squeel

Repository files navigation

CanCanCan-BabySqueel

Build Status Coverage Status

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.

About

Adapter using baby_squeel for Cancancan

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages