在我写 routes 时出现了一个小问题 我的 routes 是这样写的
get "users/forget_password"
resources :users, :except => [:index, :destroy]
这样写时是没有问题的 但当我这样写时
resources :users, :except => [:index, :destroy]
get "users/forget_password"
就会提示错误
Started GET "/users/forget_password" for 127.0.0.1 at 2012-09-12 20:39:01 +0800
Processing by UsersController#show as HTML
Parameters: {"id"=>"forget_password"}
怎么会这个样子呢 查看了一下 rake routes
users POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PUT /users/:id(.:format) users#update
users_forget_password GET /users/forget_password(.:format) users#forget_password
不应该出问题呀?? 后来改成
get "users/forget_password"
resources :users, :except => [:index, :destroy]
就没问题了。。不知何解