I have a User model. Now I have an array named id_array containing certain ids such as:
id_array=[123,145,229]
Now is there any rails way to get only those records from users table with these matching ids in id_array by using active record query?
I don't want to write a do-each loop to achieve this. I just want a single active record query which will give the result.
Please help me if there is a way. Thanks in advance!!