Created
January 28, 2013 07:20
-
-
Save ppworks/4653612 to your computer and use it in GitHub Desktop.
resourcesとresourceを組み合わせる際の注意点 ref: http://qiita.com/items/9b792c9bcb8bc4289066
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake routes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
users GET /users(.:format) users#index | |
user GET /users/:id(.:format) users#show | |
edit_users GET /users/edit(.:format) users#edit | |
PUT /users(.:format) users#update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Failures: | |
1) UsersController routing /users routing /users CRUD routes to #edit | |
Failure/Error: get("/#{resources}/edit").should route_to("#{resources}#edit") | |
The recognized options <{"action"=>"show", "controller"=>"users", "id"=>"edit"}> did not match <{"controller"=>"users", "action"=>"edit"}>, difference: <{"action"=>"edit", "id"=>"edit"}>. | |
<{"controller"=>"users", "action"=>"edit"}> expected but was | |
<{"action"=>"show", "controller"=>"users", "id"=>"edit"}>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake routes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
edit_users GET /users/edit(.:format) users#edit | |
users PUT /users(.:format) users#update | |
GET /users(.:format) users#index | |
user GET /users/:id(.:format) users#show |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource :users, only: [:edit, :update] | |
resources :users, only: [:index, :show] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment