Commit 7af82d25 by Jon Yurek

Typo fix in s3_url checking by mkdynamic

parent 3b8ed8df
...@@ -110,7 +110,7 @@ module Paperclip ...@@ -110,7 +110,7 @@ module Paperclip
@s3_options = @options[:s3_options] || {} @s3_options = @options[:s3_options] || {}
@s3_permissions = @options[:s3_permissions] || 'public-read' @s3_permissions = @options[:s3_permissions] || 'public-read'
@s3_protocol = @options[:s3_protocol] || (@s3_permissions == 'public-read' ? 'http' : 'https') @s3_protocol = @options[:s3_protocol] || (@s3_permissions == 'public-read' ? 'http' : 'https')
@url = ":s3_path_url" unless @url.to_s.match(/^s3.*url$/) @url = ":s3_path_url" unless @url.to_s.match(/^:s3.*url$/)
end end
base.class.interpolations[:s3_path_url] = lambda do |attachment, style| base.class.interpolations[:s3_path_url] = lambda do |attachment, style|
"#{attachment.s3_protocol}://s3.amazonaws.com/#{attachment.bucket_name}/#{attachment.path(style).gsub(%r{^/}, "")}" "#{attachment.s3_protocol}://s3.amazonaws.com/#{attachment.bucket_name}/#{attachment.path(style).gsub(%r{^/}, "")}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment