Let\'s say we have the following:
irb> Post.where(:hidden => true).to_sql => \"SELECT `posts`.* FROM `posts` WHERE posts.hidden = 1\"
What I do when I'm looking for records with a "not true" condition (eg, false or nil) is:
Post.where(["(hidden IS NULL) OR (hidden = ?)", false])