diff options
author | gfyoung <gfyoung17@gmail.com> | 2018-08-03 20:22:24 +0300 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2018-08-07 10:37:36 +0300 |
commit | 15b878e27e8188e9d22755fd648f75de313f012f (patch) | |
tree | 0e04417984c141dc4651249176eff41d8455d24c /app/models/concerns/avatarable.rb | |
parent | b211f7c25307971f97646b59e56cede47380c9d6 (diff) |
Enable more frozen string in app/models/**/*.rb
Partially addresses #47424.
Diffstat (limited to 'app/models/concerns/avatarable.rb')
-rw-r--r-- | app/models/concerns/avatarable.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/concerns/avatarable.rb b/app/models/concerns/avatarable.rb index a6d604a580d..c0233661a9b 100644 --- a/app/models/concerns/avatarable.rb +++ b/app/models/concerns/avatarable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Avatarable extend ActiveSupport::Concern @@ -57,7 +59,8 @@ module Avatarable only_path = false end - url_base = "" + url_base = [] + if use_asset_host url_base << asset_host unless only_path else @@ -65,7 +68,7 @@ module Avatarable url_base << gitlab_config.relative_url_root end - url_base + avatar.local_url + query_params + url_base.join + avatar.local_url + query_params end # Path that is persisted in the tracking Upload model. Used to fetch the |