2013-08-05 31 views

回答

1

get "user/new"區別據我所知:

get "user/new" 

手段當你鍵入網址:localhost/user/new它將被users controller行動new

"user#new" 

,當你需要一些特定的URL是用p處理由特定的controlleraction進行漫遊,例如,當您打開localhost/profiles時,您希望通過users_controller動作show來處理它。

get "profile", to: "users#show" 

,或者localhost/edit_profile

get "edit_profile", to: "users#edit