spf13/Milieu — pull request #3 by mgiambalvo (2012-07-18 20:36:06+00:00)
Title: OSCON MongoDB Homework

I added an "admin" flag for users, though there's no UI to set it yet. Admin users have the ability to upload an image for a venue - the image is stored in the venue's document. This struck me as a little risky, but mongo seems to handle it fine.

I ended up base64 encoding the image data because the ruby mongo driver seems to expect a UTF-8 string. Shouldn't there be a way to store raw binary data? I tried sticking the data into a BSON::ByteBuffer first, but when I do that I get an error from the native library saying it doesn't know how to serialize that.