-2

users_path前者は index アクションに行き、後者は特定のユーザーの show アクションに行くとuser_path(user1)
思います

4

3 に答える 3

0
users_path will routes to users#index as you expected

user_path(user) will redirect to users#show if method is get

また

It will redirect or routes to users#destroy if method is delete 
于 2013-05-28T06:48:32.773 に答える
0
users_path returns /users
new_user_path returns /users/new
edit_user_path(:id) returns /users/:id/edit (for instance, edit_user_path(10) returns /users/10/edit)
user_path(:id) returns /users/:id (for instance, user_path(10) returns /users/10)

詳細については http://guides.rubyonrails.org/routing.html#crud-verbs-and-actions

于 2013-05-28T06:38:03.840 に答える