Class: Paperclip::WithDefault

Inherits:
Object
  • Object
show all
Defined in:
lib/paperclip/with_default.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.cloudfiles_optionsObject

Default options for CloudFiles.



6
7
8
9
10
11
12
# File 'lib/paperclip/with_default.rb', line 6

def self.cloudfiles_options
  @cloudfiles_options ||= {
    :url           => ":container_url/attachments/:class/:attachment/:id/:style/:filename",
    :path          => "attachments/:class/:attachment/:id/:style/:filename",
    :storage       => :cloudfiles
  }
end

.use_cloudfiles_options(options) ⇒ Object

Sets Paperclip::WithDefault.options to the given option hash merged with Paperclip::WithDefault.cloudfiles_options



16
17
18
# File 'lib/paperclip/with_default.rb', line 16

def self.use_cloudfiles_options(options)
  Paperclip::WithDefault.options = cloudfiles_options.merge(options)
end