Enable active record queries with hashes