Moving flag selection over to the controller with sql queries, versus doing it in the partial.