0
案例生成:如何让我深深的命名空间发电机工作
module MyPlugin
module Generators
module SomeNamespace
class ThingsGenerator < Rails::Generators::Base
# stuff
end
end
end
end
正如预期的那样rails g
输出这样的:
MyPlugin:
my_plugin:some_namespace:things
所以应该工作,对不对?错误:
> rails g my_plugin:some_namespace:things
Could not find generator my_plugin:some_namespace:things
那么,发生了什么事? Rails可以看到发生器,它也可以通过Rails::Generators::TestCase
完全测试。
有什么想法?我总是可以做一个my_plugin:some_namespace_things
,但它看起来很丑。