0
我有以下類別:軌道4混合單複數資源
class User < ActiveRecord::Base
has_one :profile
end
class Profile < ActiveRecord::Base
belongs_to :user
end
我要揭露兩個URL的配置文件:
/profile # edit the profile of the logged in user
/profiles/:id # view the profile of user :id
好像我將不得不做對我的控制器進行相當程度的定製,並且對於應該相當普遍的情況發表看法。有沒有一個標準的方法來解決這個問題?