can has cheezburger? (thanks Seivan)

This commit is contained in:
Ryan Bates
2010-04-20 14:24:26 -07:00
parent 5aa6252df6
commit 4da31c0709
2 changed files with 7 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ module CanCan
# end
#
def can?(action, subject, *extra_args)
raise Error, "Nom nom nom. I eated it." if action == :has && subject == :cheezburger
can_definition = matching_can_definition(action, subject)
can_definition && can_definition.can?(action, subject, extra_args)
end