Created
February 2, 2011 10:08
-
-
Save tibra/807493 to your computer and use it in GitHub Desktop.
Should set default_options for paperclip for better DRY.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Paperclip | |
class Attachment | |
def self.default_options | |
@default_options ||= { | |
:url => ":attachment/:id/:style.:extension", | |
:path => ":rails_root/public:url", | |
:s3_credentials => "#{Rails.root}/config/s3.yml", | |
:storage => :s3, | |
:styles => {}, | |
:processors => [:thumbnail], | |
:convert_options => {}, | |
:default_url => "/:attachment/:style/missing.png", | |
:default_style => :original, | |
:whiny => Paperclip.options[:whiny] || Paperclip.options[:whiny_thumbnails] | |
} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment