lib/attachs/storages/s3.rb in attachs-0.4.1 vs lib/attachs/storages/s3.rb in attachs-0.4.2

- old
+ new

@@ -7,19 +7,14 @@ options = args.extract_options! style = (args[0] || :original) if Attachs.config.base_url.present? Pathname.new(Attachs.config.base_url).join(path(style)).to_s else - if options[:ssl].present? - secure = options[:ssl] - elsif attachment.options[:ssl].present? - secure = attachment.options[:ssl] - else - secure = Attachs.config.s3[:ssl] - end - object(style).public_url(secure: secure).to_s + object(style).public_url(secure: find_option(options, :ssl, Attachs.config.s3[:ssl])).to_s end.tap do |url| - url << "?#{attachment.updated_at.to_i}" + if find_option(options, :cachebuster, Attachs.config.cachebuster) + url << "?#{attachment.updated_at.to_i}" + end end end end def process(force=false)