Sometimes we want to use a where query on a a collection of records returned which is not ActiveRecord::Relation.Hence we get the above error as Where clause is know to ActiveRecord and not to Array.
There is a precise solution for this by using Joins.
EXAMPLE:-
Suppose i need to find all user ...