I have an array with the elements [5,7,8,13]. These elements get dynamically generated based on a user’s action…they’re not hardcoded in.
I have a Product table. I would like to store the list of objects that have product id’s referenced in the array above.
@products = Product.where(id = those in the array)
I’m not sure how to do this. Any advice?