about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorAdam Thurlow <thurloat@gmail.com>2017-09-05 18:17:06 -0300
committerEugen Rochko <eugen@zeonfederated.com>2017-09-05 23:17:06 +0200
commit6994664a1391d6a027caec3d5ca9e022f41a0711 (patch)
treef0ecba66e42c7eac50f079365c416fc28b3b7d52 /app
parentbe7ffa2d7539d5a1946a3933cb9d242b9fac0ddc (diff)
swift-enable the paperclip! :paperclip: (#2322)
Diffstat (limited to 'app')
-rw-r--r--app/helpers/routing_helper.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/helpers/routing_helper.rb b/app/helpers/routing_helper.rb
index 1fbf77ec3..f4693358c 100644
--- a/app/helpers/routing_helper.rb
+++ b/app/helpers/routing_helper.rb
@@ -12,8 +12,14 @@ module RoutingHelper
   end
 
   def full_asset_url(source, options = {})
-    source = ActionController::Base.helpers.asset_url(source, options) unless Rails.configuration.x.use_s3
+    source = ActionController::Base.helpers.asset_url(source, options) unless use_storage?
 
     URI.join(root_url, source).to_s
   end
+
+  private
+
+  def use_storage?
+    Rails.configuration.x.use_s3 || Rails.configuration.x.use_swift
+  end
 end