It is necessary to model the links between the product model and categories from the admin panel. How to create and store such product categories? What connections to use?
Product category configurator? Admin panel for Yandex.market? In general, this is a very difficult task, there are many pitfalls. Define the scope... I don't think RoR fits here at all.