add model adapter for sequel
use sequel reflection method to get associated class instead
Fixes nested ability conditions in issue #859
FIX: Variable collision prevents defining permissions with multiple nested conditions
Use scoped to avoid sql query execution
Avoid deprecation warning with AR 4
Update to pass specs
Changing [].flatten to array wrapper method
Do not execute the scope condition on class permission checks.

@conditions.empty? calls ActiveRecord::Relation#empty? when a scoped condition is provided. ActiveRecord::Relation#empty? will query the database while CanCan only needs to check if conditions are set on the rule.
id_param now returns nil when the param is nil
treat ActiveRecord::Relation as Array
Fix typo
Remove .rvmrc, use .ruby-version, and move to 1.9.3
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
removed rr, bump rspec version to 2.14, expect syntax, ruby 1.9.3/2.0.0 compatible
ruby 1.8 style hash syntax
use expect syntax for Mongoid and DataMappper specs
removed should spec wording, same as on the 2nd branch
Reduce object allocations
Fixes to specs for spec update.