Simplify ApplicationSetting#repository_storages

This commit is contained in:
Nick Thomas 2016-11-04 12:56:53 +00:00
parent 630eb119cb
commit 42b238a114

View file

@ -202,11 +202,7 @@ class ApplicationSetting < ActiveRecord::Base
end end
def repository_storages def repository_storages
value = read_attribute(:repository_storages) Array(read_attribute(:repository_storages))
value = [value] if value.is_a?(String)
value = [] if value.nil?
value
end end
# repository_storage is still required in the API. Remove in 9.0 # repository_storage is still required in the API. Remove in 9.0