ernie/meta_where — Issue #43: Not In clause not working as expected
Author: DarkTatka
Created: 2012-02-04 12:10:23+00:00
State: open

Given posts with ids [1,2,3]
When I do
Post.where(:id.not_in => [])
I expect result to be [1,2,3].

The current generated query is
SELECT `posts`.* FROM `posts` WHERE `posts`.`id` NOT IN (NULL)

Which returns [].
So, Post where id is not in empty array returns instead of all posts .. an empty array.