문제

I'm trying to store two types of product identifications together, one for each product color for each product.

I want to do this without creating another table, just by storing a set of id pairs. My form looks like this:

enter image description here

How can i submit and store this data in a consistent way? Is Hstore a good alternative for this?

도움이 되었습니까?

해결책

Why don’t you want to create another table? Your data model seems to necessitate it. I would recommend avoiding database-specific solutions when a Rails-based one (adding another model) would be more universal and is trivially supported.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top