On 21 April 2012 17:47, Paul Na <[email protected]> wrote:
>>>
>>> Tests::Application.routes.draw do
>>>
>>>   resources :tests
>>
>> Precisely.  Look at the Rails Guide to see what that means.
>>
>
> Right ok i have got the new action defined with:
>
> resources :tests do
>    post 'save', :on => :collection
> end
>
> which defines as /tests/save => tests#save
>
> then i rake routes and its show up in the routes now :), but the only
> problem i couldn't see information unless i'm bind about how to set the
> form to now submit with the new /tests/save action and not tests#create.

I presume you are using form_for to generate the form.  It takes a
:url option which you can use to specify a named route.  Have a look
at the docs for form_for.  When you are trying to get it to work look
at the html of the page to check it is right.  (View > Page Source or
similar in your browser).

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