Refactor district.rb to remove duplication