RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: gkop
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.
Thanks for the note.
Thanks for the tip!
Nothing wrong with hex, but if you want base64, you could do this:
SecureRandom.base64.tr("+/", "-_")
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.
Thanks for the note.
Thanks for the tip!
Nothing wrong with hex, but if you want base64, you could do this: