Added the needed camelize to recent patch for engines and namespaced models

This commit is contained in:
Steven Anderson 2011-07-20 10:03:50 +01:00
parent 6c497b8dd9
commit d35419fa4c

View File

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