From e388abc47dbad29cdc185cde2a218f8bf897b347 Mon Sep 17 00:00:00 2001 From: Yudho Ahmad Diponegoro Date: Fri, 23 May 2014 09:06:00 +0700 Subject: [PATCH] fixed data_uri method to return the correct encoded version of the data with additional prefix --- lib/mongoid/grid_fs.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongoid/grid_fs.rb b/lib/mongoid/grid_fs.rb index 60ed44a..95eaaa0 100644 --- a/lib/mongoid/grid_fs.rb +++ b/lib/mongoid/grid_fs.rb @@ -366,7 +366,7 @@ def data end def base64 - Array(to_s).pack('m') + Array(data).pack('m') end def data_uri(options = {})