Draft: Improve permission checks and logic
- Fix rolify with_role to be combineable into larger queries without using .ids
- Add option to define rolify relations easily as has_many relations on models.
- Update associatable with the increased flexibility to let ActiveRecord combine queries better.
- Make use of hashes rather than
.ids
in the ability to prevent queries on load and allow CanCanCan to do its job better - Add extension to CanCanCan to allow joining can definitions with scopes together
TODO:
-
Check whether using .select(:id)
in the ability makes better queries than the left-overid: ....ids
. -
Check performance of new roles queries (left outer join) and determine whether its better to use scopes. -
Convert more of the ability file to use scopes.
Relates to #81