aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/foi_attachment.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-01-24 11:24:55 +0000
committerLouise Crow <louise.crow@gmail.com>2014-01-24 11:24:55 +0000
commit63586e47e1b53bca023fdbba83bff2cd138feaf3 (patch)
tree5c9ed659c968f092317de6bab59a712e2584ca66 /app/models/foi_attachment.rb
parent80e66c0fba234fc78f13d5e7635f65d2bc25fe58 (diff)
parentb0a939a4d44077b4602176042ff4432b790561ad (diff)
Merge branch 'release/0.16' into wdtk
Diffstat (limited to 'app/models/foi_attachment.rb')
-rw-r--r--app/models/foi_attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb
index 914420a2b..acbfc8a34 100644
--- a/app/models/foi_attachment.rb
+++ b/app/models/foi_attachment.rb
@@ -69,7 +69,7 @@ class FoiAttachment < ActiveRecord::Base
tries = 0
delay = 1
begin
- binary_data = File.open(self.filepath, "rb" ).read
+ binary_data = File.open(self.filepath, "rb" ){ |file| file.read }
if self.content_type =~ /^text/
@cached_body = convert_string_to_utf8_or_binary(binary_data, 'UTF-8')
else