I''m learning with routing in rails from : http://guides.rubyonrails.org/routing.html and I have first code : resources :users and last code: resources :users, :only => [:index, :show] and have error : undefined method `edit_user_path'' for #<#<Class:0x2d9d068>:0x53dacb0> can you help me this problem? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 4 April 2013 06:29, haxuan lac <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''m learning with routing in rails from : > http://guides.rubyonrails.org/routing.html > and I have first code : resources :users > and last code: resources :users, :only => [:index, :show] > and have error : > undefined method `edit_user_path'' for #<#<Class:0x2d9d068>:0x53dacb0>Your :only spec says that only index and show are valid user actions. The error says that you have tried to use edit. Either you need to include :edit in the :only spec or you need to change the code that is resulting in edit being actioned. If you have not already done so then it would be worth working right through a good tutorial such as railstutorial.org, which is free to use online. That will show you the basics of rails. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Thanks Colin. I''m learning step by step Ruby on Rails with Railstutorial.org I solved my problem. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.