在我的 Rails 3.2 应用程序中application.rb,我有以下几行来禁用我不想要的脚手架生成器:
module MyApp
class Application < Rails::Application
# rest of the config...
config.generators do |g|
g.helper false
g.stylesheets false
g.javascripts false
end
end
end
该应用程序正在使用Draper gem,如果我运行rails generate,则被decorator列为可用生成器之一。我假设添加g.decorator false到上面的列表会阻止rails generate scaffold SomeModel生成装饰器文件,但它们仍然被创建。谁能告诉我我错过了什么?