opengovernment/askthem

View on GitHub
app/models/county_official.rb

Summary

Maintainability
A
20 mins
Test Coverage
class CountyOfficial < Person
  def self.for_location(location)
    location = LocationFormatter.new(location).format
    return where(id: []) unless location

    where(state: JurisdictionId.new(state: location.state_code,
                                    county: location.sub_state_code).id)
  end
end