Skip to content

Instantly share code, notes, and snippets.

@bhoggard
Created April 23, 2009 23:51
Show Gist options
  • Save bhoggard/100845 to your computer and use it in GitHub Desktop.
Save bhoggard/100845 to your computer and use it in GitHub Desktop.
--- a/vendor/plugins/paperclip/lib/paperclip/storage.rb
+++ b/vendor/plugins/paperclip/lib/paperclip/storage.rb
@@ -243,7 +243,7 @@ module Paperclip
@cloudfiles_options = @options[:cloudfiles_options] || {}
@cf = CloudFiles::Connection.new(@cloudfiles_credentials[:username], @cloudfiles_credentials[:api_key])
@url = ":cf_path_url" unless @url.to_s.match(/^:cf.*url$/)
- @path = options[:path] || ":attachment/:id/:style/:basename.:extension"
+ @path = @options[:path] || ":attachment/:id/:style/:basename.:extension"
end
base.class.interpolations[:cf_path_url] = lambda do |attachment, style|
attachment.cloudfiles_container.object(attachment.path).public_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment