lib/paperclip/storage/imgur.rb in paperclip-imgur-0.1.5 vs lib/paperclip/storage/imgur.rb in paperclip-imgur-0.2.0

- old
+ new

@@ -54,11 +54,11 @@ def url(size = default_style) image_id = instance.send("#{name}_#{:file_name}") return @url_generator.for(size, {}) if image_id.nil? || image_id.empty? # Show Paperclip's default missing image path - ::Imgurapi::Image.new(id: image_id).url(size) + Imgurapi::Image.new(id: image_id).url(size: size, use_ssl: imgur_session.use_ssl?) end # Returns the path of the attachment. # It's exactly the Imgur hash. def path(style_name = default_style) @@ -73,10 +73,10 @@ end private def imgur_session - @imgur_session ||= ::Imgurapi::Session.instance(@imgur_credentials) + @imgur_session ||= Imgurapi::Session.instance(@imgur_credentials) end def parse_credentials(credentials = nil) if credentials.nil? && defined?(Rails) credentials = "#{Rails.root}/config/imgur.yml"