QUESTION #1
I''m unable to get a simple test with a fresh install of rails to work,
and I''d appreciate some help.
I have a customer edit view that just has:
<%= form("customer") %>
If I look at the page source that''s generated by this form, I see
that the form is defined like this:
<form action=''update'' method=''POST''>
...
Now, the URL of the edit page is:
http://localhost:3000/customer/edit/1
So when I submit this form to the server, the relative URL
(''update'')
interpreted relative to the URL "directory" that the form is in ends
up being:
http://localhost:3000/customer/edit/update
and this aborts because it tries to do the edit action on controller
customer with id="update".
Could someone please explane how this is supposed to work?
This fails in the same way whether I use webrick or fastcgi (haven''t
tried it with cgi).
QUESTION #2:
If I change the URI to the unmapped form:
http://localhost:3000/customer?action=edit&id=1
and click "update", then, of course, it tries to reference this URL:
http://localhost:3000/update
How could this possibly be expected to work? How could the relative
URL "update" be mapped to the correct URL, ever, especially if the
"parent" page for the form can be different, depending upon whether I
use the pretty or non pretty URL? I find this totally confusing--and
haven''t found anything in the documentation that explains what is
supposed to happen here.
QUESTION #3:
As far as I can tell, webrick runs without URL remapping (not as
defined by the .htaccess file, anyway). Which URL''s are supposed to be
legal with webrick? What is a local URL supposed to be relative to?
Please help. I have just completely failed to grasp the model that you
have in mind for Rails URLs. If my sample app worked, then maybe I
could figure out what you have in mind--but it doesn''t.
Thanks,
Bob