0
在我的路線,我有:如何設置「帳戶」路線?
resources :users do
resources :articles
end
,這將使用戶可以去以下網址編輯個人資料設置:
http://localhost/users/foobar/edit
我怎樣才能讓這個鏈接看起來這樣,而不是:
http://localhost/account
我希望用戶通過這個網址,而不是修改其賬戶細節:的http://本地主機/客戶而不是http:// localhost/users/foobar /編輯。
與此同時,顯示用戶的文章。我需要的網址是:
http://localhost/users/foobar/articles
我該如何防止用戶進入** http:// localhost/users/foobar/edit **? – 2011-03-29 04:00:01
如果他們訪問其他網址,則可以重定向到/帳戶。 – 2011-03-29 07:18:49