Named resources were not being loaded correctly. Fixes #633

This commit is contained in:
Oliver Morgan
2012-05-30 12:39:10 +01:00
parent ccd24ab30f
commit 78cbcf1db9
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ module CanCan
def resource_class
case @options[:class]
when false then name.to_sym
when nil then namespaced_name.to_s.camelize.constantize
when nil then (@name || namespaced_name).to_s.classify.constantize
when String then @options[:class].constantize
else @options[:class]
end