Skip to content

Instantly share code, notes, and snippets.

@walter
Created July 12, 2013 02:25
Show Gist options
  • Select an option

  • Save walter/5980966 to your computer and use it in GitHub Desktop.

Select an option

Save walter/5980966 to your computer and use it in GitHub Desktop.
# for now, only run if we have a clean slate
def self.load_from_apis_for_jurisdiction(abbreviation)
return if self.in(abbreviation).count > 0
api_parse(results_for_jurisdiction(abbreviation)).map do |attributes|
create_from_apis attributes
end
end
def self.create_from_apis(attributes, options = {})
person = build_from_api(attributes)
person.save!
PersonDetailRetriever.new(person, options).retrieve!
person
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment