I have posted this before on another site with no help so I’m hoping I
will get it here:
am a bit new to the whole RoR thing and have faced small problem,
but was not able to fine related answer to my specific condition. I am
writing an application called site which I want to be the default root
application. I did the required configuration in routes.rb file.
Problem is, on the main page, I have a GET form that does not wrap
object model, and has an id. I tried manual HTML and it didn’t work
when I am visiting the site from http://localhost:3000 because the
action ‘search’ will point to non-existing action on that level,
yielding error:
no route found to match “/search” with {:method=>:get}
if I go to http://localhost:300/site/index and do the search it works
fine. I tried the form_tag and it also didn’t help. Any idea how I can
overcome this issue?
Now problem is when I visit the index page on http://localhost:3000/site/index the action works just fine. But if I
use the root mapping, http://localhost:3000 and then do the search, it
will complain that there is no route found for GET on /search.
Now problem is when I visit the index page on http://localhost:3000/site/index the action works just fine. But if I
use the root mapping, http://localhost:3000 and then do the search, it
will complain that there is no route found for GET on /search.
Well, you need to point it in the right direction.