allow :parent => false option to work in load/authorize resource

This commit is contained in:
Ryan Bates
2010-08-06 14:26:57 -07:00
parent c9e0f4e3ef
commit 75ce2bdefa
2 changed files with 6 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ module CanCan
end
def parent?
@options[:parent] || @name && @name != name_from_controller.to_sym
@options.has_key?(:parent) ? @options[:parent] : @name && @name != name_from_controller.to_sym
end
private