aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-02-17 13:27:38 +0000
committerLouise Crow <louise.crow@gmail.com>2014-02-17 13:27:38 +0000
commitcee79d514e28536e5cfe3d2f1270f0425f35dac1 (patch)
treed0befa46aac872ab72bad20caac654303c9484ba /app/models
parent5beb7f546561616236847eea7b522a0e9a4ae6ff (diff)
parent596bc6e362554dc6d041a15ecfd5d1627deab3d0 (diff)
Merge branch 'feature/https-fixes' into rails-3-develop
Diffstat (limited to 'app/models')
-rw-r--r--app/models/foi_attachment.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb
index acbfc8a34..ecd4a1872 100644
--- a/app/models/foi_attachment.rb
+++ b/app/models/foi_attachment.rb
@@ -359,7 +359,8 @@ class FoiAttachment < ActiveRecord::Base
ret = "<html><head></head><body>";
if self.has_google_docs_viewer?
wrapper_id = "wrapper_google_embed"
- ret = ret + "<iframe src='http://docs.google.com/viewer?url=<attachment-url-here>&embedded=true' width='100%' height='100%' style='border: none;'></iframe>";
+ protocol = AlaveteliConfiguration::force_ssl ? 'https' : 'http'
+ ret = ret + "<iframe src='#{protocol}://docs.google.com/viewer?url=<attachment-url-here>&embedded=true' width='100%' height='100%' style='border: none;'></iframe>";
else
ret = ret + "<p>Sorry, we were unable to convert this file to HTML. Please use the download link at the top right.</p>"
end