fixed pagination for card type and color. needed to convert query array to active record