allow access to classes when using hash conditions since you'll generally want to narrow it down with a database query

This commit is contained in:
Ryan Bates
2010-04-16 15:56:07 -07:00
parent 8903feee70
commit f46696348e
4 changed files with 8 additions and 5 deletions

View File

@@ -145,7 +145,7 @@ describe CanCan::Ability do
@ability.can :read, Array, :first => 1, :last => 3
@ability.can?(:read, [1, 2, 3]).should be_true
@ability.can?(:read, [1, 2, 3, 4]).should be_false
@ability.can?(:read, Array).should be_false
@ability.can?(:read, Array).should be_true
end
it "should return conditions for a given ability" do