Created
December 8, 2016 11:06
-
-
Save robmckinnon/739c5269814d13ff23a17f49f3737b77 to your computer and use it in GitHub Desktop.
Get sorted list of territory and country names excluding those with end_dates using Open Register Ruby client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openregister-ruby' | |
c = OpenRegister.register('country', :beta)._all_records + | |
OpenRegister.register('territory', :alpha)._all_records | |
c.select{|x| x.end_date.blank?}.map(&:name).sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment