controller param from route with custom controller option set #46

Closed
aka47 opened this Issue Mar 17, 2010 · 2 comments

2 participants

@aka47

in rails 2.3.5 controller with a custom controller option in the routes, the controller has the format
:controller => "NameSpace::MyController" instead of :controller => "name_space/my_controller"

in routes
map.resource "name", :controller => "NameSpace::MyController"

this raises an exception in controller_resource in model_instance, because of resource_authorization on line 51 ...

NameError: `@NameSpace::MyController' is not allowed as an instance variable name in ancan-1.0.2/lib/cancan/controller_resource.rb:27

@ryanb
Owner

Looks like I need to use :: as a split in the :controller parameter. Thanks for reporting this issue.

@ryanb
Owner

properly handle Admin::AbilitiesController in params[:controller] - closed by f2a1695

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment