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,但我无法完成。
任何帮助?
感谢,
尼古拉斯福伊萨萨