Answer the question
In order to leave comments, you need to log in
How to display products by id array?
I have 3 tables. product, auto, use.
That is, goods, cars, and which goods belong to which cars.
We are making a request for AUDI A7.
use=Use.where(name: 'AUDI', model: 'A7')
returns an array of use and each element has a product ID. .
How to display products by ID array?
Answer the question
In order to leave comments, you need to log in
No description of what links are used, no information at all.
if I understand the task correctly, then we read in the area "has_and_belongs_to_many"
rusrails.ru/active-record-associations
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question