我的routes.rb是如下軌3.0控制器映射
resources :users
match 'users/login'
和耙路線顯示
users GET /users(.:format) {:action=>"index", :controller=>"users"}
POST /users(.:format) {:action=>"create", :controller=>"users"}
new_user GET /users/new(.:format) {:action=>"new", :controller=>"users"}
edit_user GET /users/:id/edit(.:format) {:action=>"edit", :controller=>"users"}
user GET /users/:id(.:format) {:action=>"show", :controller=>"users"}
PUT /users/:id(.:format) {:action=>"update", :controller=>"users"}
DELETE /users/:id(.:format) {:action=>"destroy", :controller=>"users"}
users_login /users/login(.:format) {:controller=>"users", :action=>"login"}
但是當我做
http://localhost:3000/users/login
其進入/用戶/節目。我可以理解爲什麼它發生,因爲它在控制檯上顯示
Processing by UsersController#show as HTML
Parameters: {"id"=>"login"}
這怎麼解決。
Harshit
偉大的工作.. – harshit