RailsCasts Pro episodes are now free!

Learn more or hide this

Gabe Kopley's Profile

GitHub User: gkop

Comments by Gabe Kopley

Avatar

In fact, because Rails prefers JSON be root wrapped, you need to use this library if you want to have a nice clean controller like Ryan's without heavily customizing ngResource.

Avatar

Nothing wrong with hex, but if you want base64, you could do this:

SecureRandom.base64.tr("+/", "-_")