I faced the exactly same problem.
This is caused by ruby’s language specification,
rather than by the implementation of ActiveSupport.
When you accessed User::WelcomeController,
it is expected that missing of User::WelcomeController raises
and Name Error exception. ActiveSupport handles this exception.
However, if ::WelcomeController was already loaded, Ruby would
treat it as User::WelcomeController, and raise no exception,
and ActiveSupport couldn’t work.
For example, following code refers Foo::Bar which doesn’t exsist,
but this code don’t results in NameError exceptions.
To solve this problem, I added codes like followings:
Dependencies.load_missing_constant self, :WelcomeController
This results in User::WelcomeController to be always loaded
when User is loaded(User will be loaded when you try to access
If Ruby supports options or flags to resolve name scopes
strictly, it will work well for this problem.
But I’m not sure whether Ruby does.
[email protected] wrote:
I have a top level controller and a nested controller with the same
It works fine in development mode.
Then in production mode, it says there are no actions for that
controller, and plops out this error…
inflector.rb:250: warning: toplevel constant WelcomeController
referenced by User::WelcomeController
Is’nt that the whole point of modules, there basically a namespace to
keep this from being a problem ???