swift-enable the paperclip! 📎 (#2322)
This commit is contained in:
parent
be7ffa2d75
commit
6994664a13
5 changed files with 39 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue