Use mongoid query instead of ruby to retain AR relation