Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
Fix broken spec and had to undo the changes introduced in d5baed6. Ha…
Browse files Browse the repository at this point in the history
…ven't really investigated why this code fixes the bug that commit fixed already.
  • Loading branch information
andhapp committed Jun 19, 2012
1 parent 28373d7 commit 29a2d58
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/cancan/controller_resource.rb
Expand Up @@ -236,12 +236,8 @@ def name
@name || name_from_controller
end

def namespace
@params[:controller].split("::")[0..-2]
end

def namespaced_name
[namespace, name.camelize].join('::').singularize.camelize.constantize
@name || @params[:controller].sub("Controller", "").singularize.camelize.constantize
rescue NameError
name
end
Expand Down

0 comments on commit 29a2d58

Please sign in to comment.