Permalink
Browse files

namespaced_resource fixed to inscapsulate better

  • Loading branch information...
inossidabile committed Dec 4, 2011
1 parent 5420cbc commit b7b86c5181c6e7ff90a19b9c29594a8bf474075b
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cancan/controller_resource.rb
@@ -214,7 +214,7 @@ def namespaced_name
end
def namespaced_resource
- @name || @params[:controller].sub("Controller", "").underscore.gsub('/', '_').singularize
+ namespaced_name.to_s.underscore.gsub('/', '_').singularize
rescue
name
end

0 comments on commit b7b86c5

Please sign in to comment.