Rails、iOS、およびdeviseを使用しています。シングルユーザーを読みたい。パスはusers/:idになります。
次のエラーが発生します。
Started GET "/users/0" for 127.0.0.1 at 2012-06-11 17:37:50 -0600
Processing by UsersController#show as JSON
Parameters: {"id"=>"0"}
[Devise] Could not find devise mapping for path "/users/0".
Maybe you forgot to wrap your route inside the scope block? For example:
devise_scope :user do
match "/some/route" => "some_devise_controller"
end
Completed 500 Internal Server Error in 0ms
AbstractController::ActionNotFound (Could not find devise mapping for path "/users/0".
Maybe you forgot to wrap your route inside the scope block? For example:
devise_scope :user do
match "/some/route" => "some_devise_controller"
end
リソース:usersをdevise_for:usersの下に配置し、「users /:id」=>「users#show」を取得して「users /:id」=>「users#show」と一致させてみました。
何か案は?