quick fix to get nested resources working again - closes #482

This commit is contained in:
Ryan Bates
2011-10-04 15:02:59 -07:00
parent 26b40f2b49
commit 67a3038628
5 changed files with 8 additions and 8 deletions

View File

@@ -208,7 +208,7 @@ module CanCan
end
def namespaced_name
@params[:controller].sub("Controller", "").singularize.camelize.constantize
@name || @params[:controller].sub("Controller", "").singularize.camelize.constantize
rescue NameError
name
end