In Rails 4 with Postgres, Rails seems to actually populate the string "null" for serialized columns that are zero.
That is, Rails makes the field display nil , but you must specifically request "null" to get the correct result.
So, under Rails 4, the accepted answer no longer works, but it works for me:
@projects = Project.where("rankings = 'null'")
shedd source share