On 19 January 2012 21:50, art tav <[email protected]> wrote:
> Colin Law wrote in post #1041687:
>> On 19 January 2012 20:42, art tav <[email protected]> wrote:
>>>
>>>
>>> form action="/controllerName/" method="post"
>>
>> I hesitate to reply because I do not fully understand what you are
>> doing so anything I say may be rubbish.  However I believe that the
>> url generated by a commit action of a form (which I think is what you
>> are referring to) is nothing to do with anything in routes.rb, it is
>> purely determined by the html of the page and, if it is a relative
>> url, then the url of the current page.  The routes.rb file is only
>> referenced after the post is received to determine where to send it.
>> Secondly you say that the form giving the problem is "this one" then
>> show us two form tags.
>> Thirdly, and this is the bit I don't understand and so hope to learn
>> more, why are you specifying the controller name in the action and why
>> the ../ or / on the front?
>>
>> Colin
>
> Hi Colin,
>
> for example this other form don't give this problem
>
> <form action="../report/c" method="post">
>
> when I submit this form the route is correct lets say
> www.name.com/test/report/c
>
> and with the other form the problem is that the /test/ is omitted so it
> lead to a page that doesn't exist.
>

If you try to answer my questions I will do my best to help.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to