Using Rails 5.
I have an ordered array of clients. It's not possible for me to get an AR out of it, and this is the only way I can get these clients.
And I want to show only the clients where a certain condition is met. .where(category_id: 1), but as this is not an AR, I can't run a .where(category_id: 1) on the array of clients.
How do I achieve this? With a Scope? But how specifically? And is this still used in Rails 5?
I am basically in the same situation as second-most-upvoted in this question and basically I have an array with my clients: ActiveRecord.find(array_of_ids), preserving order (Couldn't make the other suggestions work in the thread about turning my array into an AR)
Anyways, how can I achieve this?