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 %> Browser back me mistake undefined local variable or method `long_product_category_path'' for #<#<class:0x1036ed8c8>:0x1036e92a0 </class:0x1036ed8c8> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 13, 7:21 am, Vladimir Shakirov <vladimir.shaki...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
I run rake routes comoleted_user_todo I did it But situation the same undefined local variable or method `comoleted_user_todo_path'' On Apr 13, 2:54 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 13, 7:21 am, Vladimir Shakirov <vladimir.shaki...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Sent from my iPhone On Apr 13, 2011, at 6:42 AM, Vladimir Shakirov <vladimir.shakirov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I run rake routes > comoleted_user_todo > > I did it > But situation the same > undefined local variable or method `comoleted_user_todo_path'' > > On Apr 13, 2:54 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On Apr 13, 7:21 am, Vladimir Shakirov <vladimir.shaki...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> 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 >>Like Fred said, typo. There is no comoleted_user_todo_path but there is a completed_user_todo_path. B. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sorry It''s my mistake when i typed here In my code completed_user_todo_path And in route collection do get :completed end 2011/4/13 Bryan Crossland <bacrossland-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> Sent from my iPhone > > On Apr 13, 2011, at 6:42 AM, Vladimir Shakirov < > vladimir.shakirov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I run rake routes > > comoleted_user_todo > > > > I did it > > But situation the same > > undefined local variable or method `comoleted_user_todo_path'' > > > > On Apr 13, 2:54 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > >> On Apr 13, 7:21 am, Vladimir Shakirov <vladimir.shaki...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> 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 > >> > > Like Fred said, typo. There is no comoleted_user_todo_path but there is a > completed_user_todo_path. > > B. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Владимир Шакиров +7-916-811-7922 Продается книжный интернет-магазин www.molobooks.ru<http://business.slando.ru/moskva/knizhnyy-internet-magazin-www-molobooks-ru_P_31997178.html> <http://www.lifelist.ru>www.lifelist.ru www.molobooks.ru www.about.me/remale <http://about.me/remale> www.besimple.ru <http://www.ti-systems.ru> www.remale.ru -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
2011/4/13 Владимир Шакиров <vladimir.shakirov@gmail.com>> Sorry > It''s my mistake when i typed here > In my code > completed_user_todo_path > >it''s a bit weird but your routes look like http://pastie.org/1793800 so use completed_user_todo_index_path> And in route > > collection do > get :completed > end > > 2011/4/13 Bryan Crossland <bacrossland-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> Sent from my iPhone >> >> On Apr 13, 2011, at 6:42 AM, Vladimir Shakirov < >> vladimir.shakirov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> > I run rake routes >> > comoleted_user_todo >> > >> > I did it >> > But situation the same >> > undefined local variable or method `comoleted_user_todo_path'' >> > >> > On Apr 13, 2:54 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > wrote: >> >> On Apr 13, 7:21 am, Vladimir Shakirov <vladimir.shaki...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >> 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 >> >> >> >> Like Fred said, typo. There is no comoleted_user_todo_path but there is a >> completed_user_todo_path. >> >> B. >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > > > -- > > Владимир Шакиров > +7-916-811-7922 > > Продается книжный интернет-магазин www.molobooks.ru<http://business.slando.ru/moskva/knizhnyy-internet-magazin-www-molobooks-ru_P_31997178.html> > > <http://www.lifelist.ru>www.lifelist.ru > www.molobooks.ru > www.about.me/remale <http://about.me/remale> > www.besimple.ru > <http://www.ti-systems.ru> > www.remale.ru > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.