Skip to content

Instantly share code, notes, and snippets.

@radar
Forked from traels/config_application.rb
Created July 1, 2014 04:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save radar/e414c49579b393e4aafe to your computer and use it in GitHub Desktop.
config.paperclip_defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => 'BUCKET',
:access_key_id => 'S3_KEY',
:secret_access_key => 'S3_SECRET'
}
}
Paperclip::Attachment.default_options[:s3_protocol] = "https"
Spree::Image.attachment_definitions[:attachment][:styles] = ActiveSupport::JSON.decode('{"mini":"48x48\u003E","small":"100x100\u003E","product":"240x240\u003E","large":"600x600\u003E"}').symbolize_keys!
Spree::Image.attachment_definitions[:attachment][:path] = " /#{Rails.env}/:id/:style/:basename.:extension"
Spree::Image.attachment_definitions[:attachment][:url] = '/spree/products/:id/:style/:basename.:extension'
Spree::Image.attachment_definitions[:attachment][:default_url] = ''
Spree::Image.attachment_definitions[:attachment][:default_style] = 'product'
@subos2008
Copy link

Why the JSON.decode line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment