I want to upload images on my local machine for development but store them on my Amazon S3 account for production.
upload.rb
if Rails.env.development?
One more solution is to move the hash with params to constants, which will be defined in config/environments/*.rb files. Then you can just use
has_attached_file :proto, PAPERCLIP_STORAGE_OPTS
Using if/unless in model while defining methods is a bit messy I think