ActiveScaffold with Rails 3.0 中的路由问题
我正在尝试使用 Rails 3.0 的 ActiveScaffold,仍然试图让它正常工作。 遇到错误
No route matches {:active_scaffold=>true, :action=>"show_search", :controller=>"locations"}
当我浏览到 http://localhost:3000/locations 时 。我的routes.rb 中有“resources :locations, :active_scaffold => true”,但我不知道这是否是Rails 3.0 的正确语法。
我从未使用过 ActiveScaffold,也没有致力于它,所以另一个问题是是否有更好的替代方案 - 或者这是否取决于安装的具体情况?
I'm trying out ActiveScaffold with Rails 3.0, still trying to get it to work at all. I'm getting an error
No route matches {:active_scaffold=>true, :action=>"show_search", :controller=>"locations"}
when I browse to http://localhost:3000/locations. I have "resources :locations, :active_scaffold => true" in my routes.rb, but I don't know if that is the right syntax for Rails 3.0.
I have never used ActiveScaffold and am not committed to it, so another question is whether there are better alternatives -- or does that depend on the specifics of the installation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然有一个新版本的 Rails 3.0 ActiveScaffold 分支,或者可能只是我发现的新文档。路由应该是
如果您从一开始就使用 AS 生成模型,它会为您插入该模型。
There is apparently a new version of the Rails 3.0 fork of ActiveScaffold, or perhaps just new documentation I found. The routing should be
If you generate a model using AS from the beginning, it inserts this for you.
按照 github 上的说明进行操作时,我遇到了同样的问题。只需使用
rails g active_scaffold XXXXX
命令,它也会写入您的路线。此外,您应该使用此 active_scaffold 叉I had the same problem when folowing instructions on github. Just use
rails g active_scaffold XXXXX
command and it will also write your route.Also you should be using this active_scaffold fork