I'm having an issue where an ability has a 2D array of rules after initialization:
@rules=[[#<CanCan::Rule:0x007fc222435f30 @match_all=false, @base_behavior=true, @actions=[:read], @subjects=[#<Consumer...>], @conditions={"users_roles.user_id"=>4}, @block=nil>]]
I worked around it by adding a method to flatten the rules, but I have no idea where the nesting is happening.
Also, I couldn't get the CanCan method #accesible_by to work with this rule, so I looked at how CanCan was creating the SQL query. There's a method in /model_adapters/active_record_adapter called #database_records that should get the conditions I've set, but the @rules variable it calls is empty. I don't know how it's being set correctly in CanTango and yet stays empty for CanCan. I'd appreciate any thoughts people have.