Skip to content

Instantly share code, notes, and snippets.

@Manfred
Created October 10, 2013 21:24
Show Gist options
  • Save Manfred/6925876 to your computer and use it in GitHub Desktop.
Save Manfred/6925876 to your computer and use it in GitHub Desktop.
def random_sales_force_account_id
'%d%d%d%d-%d%d%d%d%d-%d%d%d%d' % ([9]*13).map { |i| rand(i) }
end
@floere
Copy link

floere commented Oct 10, 2013

For no other reason than being bored:

[4,5,4].map { |i| rand(10**i) }.join ?-

Is 0000-00000-0000 valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment