2011-07-21 56 views
0

的routes.rb:鏈接到資源成員路線

resources :user do 
    post 'profile', :on => :member 
end 

我試圖鏈接到特定用戶的配置文件。 app.user_path(@user)給我users/12443,但我需要users/12443/profile。我將如何做到這一點?

回答

1

嘗試

app.user_profile_path(@user) 
+0

NoMethodError:未定義的方法:( – Cev

+0

@Cev,你可以張貼輸出運行'耙routes'的 – Dogbert

+0

甚至沒有想到檢查路線這是app.profile_user_path(@?用戶)。謝謝! – Cev