在我的 rails 应用程序中,我有一个包含许多Enterprises
.
在我的节目/节目中,我希望可以选择简单地创建一个Enterprise
属于所示节目的新节目。
我尝试使用嵌套资源和路由助手new_program_enterprise_path
,但它给了我No route matches "{:action=>"new", :controller=>"enterprises"}"
错误。
这就是我routes.rb
的:
resources :programs do
resources :enterprises
end