In my Sinatra app, I'm using a MongoDB with Grid to store book covers on Heroku. I want to be able to associate these with the books in my ActiveRecord-driven primary database. Currently, I'm downloading the image from Google Books, storing it in the MongoDB, and storing the BSON::ObjectID object into the database as a string.
When I go to retrieve the image, however, grid won't accept this string as a way to get the file.
Is there a better way for me to store this information or a better way for me to associate data between the two databases?