ActiveScaffold - Search route doesn't work with REST

Another one with ActiveScaffold. Am I doing something wrong? Is my
workaround correct?

Cheers, Sazima


What steps will reproduce the problem?

  1. Create RESTful application (script/generate scaffold user)
  2. Install/use ActiveScaffold
  3. Click on “Search”

What is the expected output? What do you see instead?
Search field. Instead there is an error because the REST route to the
“user”
resource has higher priority in routes.rb than common routes):

ActiveRecord::RecordNotFound (Couldn’t find User with ID=show_search)

I had to move the ERST route to the end of the file to get the search
feature to work…

What version (or revision) of the product are you using?
1.1.1 with Rails 2.0.2 (InstantRails2 installation)

Sazima wrote:

I had to move the ERST route to the end of the file to get the search
feature to work…

If you enable active_scaffold on your REST routes, you don’t have to
reorder anything

Ex.

map.resources :candidates, :active_scaffold => true

Hope this helps,

Chris

This helped me out. Thanks Chris!

` Chuck

On Jan 26, 2:08 am, Chris M. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs