I need something like this below.
products['first_category'][0] = ['aaa', 'bb', 'ccc']
products['first_category'][1] = ['aa', 'bb', 'cc']
products['first_category'][2] = ['a', 'b', 'c']
products['second_category'][0] = ['asd', 'sdfb', 'csdfd']
products['second_category'][1] = ['sdf', 'bsdf', 'dsfssd']
all_products = products['first_category'] + products['second_category']
This should produce an array of the form
all_products[0] = ['aaa', 'bb', 'ccc']
all_products[1] = ['aa', 'bb', 'cc']
all_products[2] = ['a', 'b', 'c']
all_products[3] = ['asd', 'sdfb', 'csdfd']
all_products[4] = ['sdf', 'bsdf', 'dsfssd']
But I don't know how to implement this in ruby. I tried this but it gives error.