在我的炼油厂扩展中,我有一个国会模型,它是扩展的“主要”模型。此外,我还有一个住宿模型,它嵌套在国会路线中,如下所示:
namespace :admin do
resources :congresses do
resources :accommodations
as_routes
end
end当我试图通过它的新动作来创造一个新的住处时,我得到:
Processing by Refinery::Admin::AccommodationsController#new as HTML
'admin' tried to access 'refinery/admin/accommodations' but was rejected.
Filter chain halted as :restrict_controller rendered or redirected有人知道发生了什么吗?迁就新行动号召国会意见,这是相关的吗?
发布于 2016-04-29 16:29:45
好的,我在这里中找到了解决我的问题的方法。基本上,在这种情况下,您必须添加如下一行:
plugin.menu_match = /(admin|refinery)\/(congresses|accommodations)$/到“父”模型引擎文件,以便可以访问嵌套模型控制器。
至少对我有用。
https://stackoverflow.com/questions/36921220
复制相似问题