[Rails] Re: Nested route with collection
On Apr 13, 7:21 am, Vladimir Shakirov <vladimir.shaki...@gmail.com>
wrote:
> Hi!
>
> I try to do nested route with collection, but I always have mistake
> route:
> resources :user do
> resources :todo do
>
> member do
> post :complete
> end
>
> collection do
> get :completed
> end
>
> resources :post
> end
> end
>
> View:
> <%= link_to_if (params[:action] == 'home'), 'Done',
> comoleted_user_todo_path %>
you've got a typo there
>
> Browser back me mistake
> undefined local variable or method `long_product_category_path' for
> #<#<class:0x1036ed8c8>:0x1036e92a0 </class:0x1036ed8c8>
>
if you run rake routes it will tell you the names of all your routes
Fred
> Could you help
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home