Please sign in to comment.
Allow multiple abilities with associations
There are two issues with the current way cancan handles associations: 1) Records are returned multiple times in some circumstances 2) Several defined abilities prevent some records to show up under certain circumstances This commit includes tests for both cases. It fixes both problems by changing `joins` to `includes` for the AR adapters. This could have performance implications, since `includes` will also select all columns in the associated records. We tried various ways of achieving the same thing using Arel directly, but were unable to make this work due to lack of support for outer joins in Rails 3.1. This closes issues #724, #566 and #613
- Loading branch information...
Showing with 20 additions and 2 deletions.