lib/mls/models/document.rb in mls-1.8.0 vs lib/mls/models/document.rb in mls-1.9.0

- old
+ new

@@ -17,10 +17,13 @@ instantiate(JSON.parse(res.body).select{|k,v| column_names.include?(k.to_s) }) end end def url(style=:original) - File.join(MLS.config['document_host'].gsub(/\/$/, ''), path(style)) + URI::HTTPS.build( + host: MLS.config['document_host'].gsub(/\/$/, ''), + path: path(style) + ) end def path(style=:original) File.join("documents", "#{partition(style == :original ? hash_key : "#{hash_key}-#{style}")}") end \ No newline at end of file