Commit 37e5e5f5 by John Hawthorn Committed by Jon Yurek

only require fog and define interpolation when needed

parent f768cc20
......@@ -8,7 +8,7 @@ module Paperclip
rescue LoadError => e
e.message << " (You may need to install the fog gem)"
raise e
end
end unless defined?(Fog)
base.instance_eval do
@fog_directory = @options[:fog_directory]
......@@ -19,7 +19,7 @@ module Paperclip
@url = ':fog_public_url'
Paperclip.interpolates(:fog_public_url) do |attachment, style|
attachment.public_url(style)
end
end unless Paperclip::Interpolations.respond_to? :fog_public_url
end
end
......
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