lib/filepreviews/utils.rb in filepreviews-2.0.3 vs lib/filepreviews/utils.rb in filepreviews-2.0.4
- old
+ new
@@ -11,11 +11,11 @@
# Extracts metadata parameters
# @param metadata [Array] image formats
# @return [String] metadata url parameters
def extract_metadata(metadata)
- metadata.join(',')
+ metadata.to_a
end
# Validates page parameters
# @param pages [Array] page parameters
# @return [String] page thumbnail parameters
@@ -40,10 +40,10 @@
# @return [Hash<Symbol>] processed parameters for http request
def process_params(params)
parameters = { url: CGI.unescape(params.url) }
if params.metadata
- parameters[:metadata] = [extract_metadata(params.metadata)]
+ parameters[:metadata] = extract_metadata(params.metadata)
end
parameters
end
end