Rails diff model config in dev or prod environment
- by Denis
Hi,
I've a model which use paperclip, in dev env I want to store files on the file system.
In production I want to store them on my s3 account.
How to configure my model to reflet this difference?
Here is my model
class Photo < ActiveRecord::Base
has_attached_file :photo, :styles => { :medium => "200x200>", :thumb => "100x100>" },
:storage => :s3,
:s3_credentials => "#{Rails.root}/config/s3.yml",
:path => "/:style/:filename"
end