aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-12-03 17:14:49 +0000
committerLouise Crow <louise.crow@gmail.com>2013-12-03 17:16:34 +0000
commit41d7734651e0dd506f20bda6243cc8c2ebae0e5f (patch)
treeb158c52e934e6809a78feda40f774cc3b13a22e7
parent272c53a249abe4d302586c2b668d05306c978d8b (diff)
parent5cb6338e7153635d49801a6328f0a9a6b66aba43 (diff)
Merge branch 'feature/1201-close-attachment-files-after-read' into rails-3-develop
-rw-r--r--Gemfile1
-rw-r--r--app/models/foi_attachment.rb2
2 files changed, 1 insertions, 2 deletions
diff --git a/Gemfile b/Gemfile
index 83042995a..e4b12100e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -48,7 +48,6 @@ gem 'zip'
gem 'fast_gettext'
gem 'gettext_i18n_rails'
gem 'gettext'
-
gem 'globalize3', :git => 'git://github.com/globalize/globalize.git', :ref => '5fd95f2389dff1'
gem 'locale'
gem 'routing-filter'
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