Created
August 20, 2010 17:20
-
-
Save adriand/540757 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# The Attachment class manages the files for a given attachment. It saves | |
# when the model saves, deletes when the model is destroyed, and processes | |
# the file upon assignment. | |
class Attachment | |
def self.default_options | |
@default_options ||= { | |
:url => "/system/:class/:attachment/:id/:style/:basename.:extension", | |
:path => ":rails_root/public/system/:class/:attachment/:id/:style/:basename.:extension", | |
:styles => {}, | |
:default_url => "", | |
:default_style => :original, | |
:validations => {}, | |
:storage => :filesystem, # if you wish to use S3 everywhere, change this to :storage => :s3 | |
:s3_credentials => "#{RAILS_ROOT}/config/s3.yml" | |
} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment