Due to rails merging "where" conditions with same
left hand side, queries like:
Product.where(:number => [1,2,3]).
where(:number => [2,3,4]).page(1)
Resulted in SQL like
SELECT * FROM products WHERE number IN (2,3,4) LIMIT 25 OFFSET 0
Which was wrong. It was caused by nested attributes.
I got rid of them and used standard class method,
preferred for Rails 3.x.