From 6994664a1391d6a027caec3d5ca9e022f41a0711 Mon Sep 17 00:00:00 2001 From: Adam Thurlow Date: Tue, 5 Sep 2017 18:17:06 -0300 Subject: swift-enable the paperclip! :paperclip: (#2322) --- app/helpers/routing_helper.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/helpers/routing_helper.rb') 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 -- cgit