Why doesn't this Rails SQL query work: companies.status = 'active' AND (companies.status_override = '' OR companies.status_override = NULL)
===

I have the following full query, and it returns nothing.

    @companies.where("(companies.status = 'active' AND (companies.status_override = '' OR companies.status_override = NULL)) OR companies.status_override = 'active'")

I expect that the first part `(companies.status = 'active' AND (companies.status_override = '' OR companies.status_override = NULL))` would return all items that have `status` set to 'active' and `status_override` set to anything.
