Skip to content

Instantly share code, notes, and snippets.

@thescubageek
Created September 6, 2016 14:12
Show Gist options
  • Save thescubageek/191a04d958fda588b55abc3c9c4d4fe9 to your computer and use it in GitHub Desktop.
Save thescubageek/191a04d958fda588b55abc3c9c4d4fe9 to your computer and use it in GitHub Desktop.
## G5 Hub
def get_urn(url)
url.gsub("https://","").gsub(".herokuapp.com","")
end
## Find all internal clients
Client.where(g5_internal: true).map { |c| get_urn(c.cms_url) }
## Find all real clients
Client.where(g5_internal: false).map { |c| get_urn(c.cms_url) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment