Mike Blyth
Mike Blyth

Reputation: 4258

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 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?

Upvotes: 2

Views: 1640

Answers (2)

Mike Blyth
Mike Blyth

Reputation: 4258

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.

Upvotes: 6

Schtrudell
Schtrudell

Reputation: 376

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

Upvotes: 3

Related Questions