Rails Code Snippets

This allows you to do String.random_alphanumeric(num) to get a random string that is num characters long. Useful for generating random identifier keys.

It's an unfortunate necessity that you need to write different code for windows sometimes or at the very least load different libraries since there is no fork(), etc. This is how you can tell.