On 4 April 2013 06:29, haxuan lac <li...@ruby-forum.com> 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+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to