activescaffold 控制器缺少 activescaffold 解决方法
我有一个使用了 3 年的应用程序,其中有一些控制器具有一些非常不稳定的操作。我正在尝试实现一个与一些旧资源有关系的新资源,但我想使用 activescaffold 来管理嵌套资源,而不是尝试重写代码库的其余部分。我需要为使用 activescafold 的嵌套资源编写新的控制器,但我不能丢失旧的控制器,也不能重命名它们。如何让 activescaffold 配置从新控制器获取嵌套资源的配置,而不是尝试查看传统命名的控制器的配置?
谢谢你的帮助:)
-C
I have a 3yr old application that has some controllers with some very unrestful actions. I'm trying to implement a new resource that has relationships to some of the older ones, but I want to use activescaffold to manage the nested resources rather than try to rewrite the plate of spaghetti that is the rest of the codebase. I need to write new controllers for the nested resources that use activescaffold, but I can't lose the old controllers, and I can't rename them either. how can I get the activescaffold config to pick up the config for the nested resources from the new controller rather than trying to look at the conventionally named controller for the configuration?
thx for your help :)
-C
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 active_scaffold_controller_for 覆盖方法。来自 ActiveScaffold 文档 - http://www.activescaffold.com/docs/api-core
You can use the active_scaffold_controller_for override method. From the ActiveScaffold documentation - http://www.activescaffold.com/docs/api-core