I applied your patch to my rails app with sunspot support. In the readme you state:
"This version assumes the attachment attribute has method +.data+, that returns contents of the attachment."
But what exactly should "data" return? It doesn't work with a paperclip attachment out of the box. I also tried to patch the a
paperclip attachment to respond to the "data" method, but I don't know what it should return. to_file or even uploading the file as a multipart post using UploadIO didn't work. Could you please add some documentation about what "data" is supposed to return and maybe even how to make your patch work with paperclip? Thanks.