0
我有一個類別模型和產品模型。Rails路線問題。總是找到名稱和刪除/ class_name /從路線
Category has_many products
和
Product belongs_to Category
我希望我的路線是這樣的:
/:category_type/:category_name/ opens Product#index
/:category_type/ opens Category#index
/opens Category#index
有沒有辦法實現與資源?我嘗試過使用path_prefix,但我無法完成。
任何幫助?
感謝,
尼古拉斯福伊薩薩