Ruby on Rails
Thursday, December 1, 2011
in your path are you sending the project object as params?
2011/12/1 Vogon Primo <lists@ruby-forum.com>
Frederick Cheung wrote in post #1034554:
> On Dec 1, 11:28am, Vogon Primo <li...@ruby-forum.com> wrote:
>> POST /projects/:project_id/tickets(.:format)
>>Hi Frederick,
>> It invokes the show action and not the index action. Why?
>>
> It's also doing weird stuff because it hasn't picked a project_id from
> the url but it has picked an id. Do you have any other routes that
> might be matching this url instead of the ones that you intended to be
> used?
>
> Fred
I have only the standard REST routes generated by Rails, with
MyProject::Application.routes.draw do
get "projects/index"
root :to=> 'projects#index'
resources :projects do
resources :tickets
end
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
--
thiagocifani
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment