Reputation: 6493
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:
How can i submit and store this data in a consistent way? Is Hstore a good alternative for this?
Upvotes: 0
Views: 218
Reputation: 6397
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.
Upvotes: 1