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

- old
+ new

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