Forks

Revisions

gist: 42525 Download_button fork
public
Public Clone URL: git://gist.github.com/42525.git
Embed All Files: show embed
Diff #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- has_attachment :content_type => :image,
- :thumbnails => {
- :thumb => [80,80],
- :small => '320x320>'
- },
- :storage => :s3,
- :s3_access => :private
+
+ has_attached_file :photo,
+ :styles => {
+ :thumb => ["80x80#", :jpg],
+ :small => ["320x320>", :jpg]
+ },
+ :storage => :s3,
+ :s3_credentials => "#{RAILS_ROOT}/config/amazon_s3.yml",
+ :s3_permissions => 'private',
+ :path => ":id/:style.:extension",
+ :bucket => "#{RAILS_ENV == 'production' ? 'photos' : 'backup'}_bucket"