Good Morning Overflow.
I\'m having a problem trying to select all Treatments that have any of the ID\'s stored in an array called @problem.
Treatments
@problem
Selecting record by ids array is done with a query:
Record.where(id: ids)
where ids is ids array. It can be replaced with another query.
ids
For your case selecting remedies by match name will be as follows:
ids = Remedy.where("LOWER(remedyName) LIKE ?", name.downcase).pluck(:id)