this could be `where('categories.id' => categories).uniq`  to decouple from sql a teeny bit.