Extension to paperclip_database gem