开发者

Routing problem in ActiveScaffold with Rails 3.0

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 synta开发者_StackOverflow中文版x 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?


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

  resources :locations do as_routes end

If you generate a model using AS from the beginning, it inserts this for you.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜