Commit 1c682aaf11cfbb4e8d5098435ea7b2eaab1f3aba
1 parent
85be7e98
Exists in
master
and in
1 other branch
blitz is not a gem
Showing
2 changed files
with
8 additions
and
2 deletions
Show diff stats
vendor/gems/blitz
@@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
1 | -Subproject commit 572958cbd931ee381ed4667b9229adf3a6bc7e04 |
vendor/plugins/blitz/generators/model/templates/model.rb
@@ -3,6 +3,13 @@ class <%= class_name %> < ActiveRecord::Base | @@ -3,6 +3,13 @@ class <%= class_name %> < ActiveRecord::Base | ||
3 | belongs_to :<%= each.name %> | 3 | belongs_to :<%= each.name %> |
4 | <% end -%> | 4 | <% end -%> |
5 | <% attributes.select { |each| each.type == :paperclip }.each do |each| -%> | 5 | <% attributes.select { |each| each.type == :paperclip }.each do |each| -%> |
6 | - has_attached_file :<%= each.name %> | 6 | + has_attached_file :<%= each.name %>, |
7 | + :path => ":attachment/:id/:style.:extension", | ||
8 | + :storage => :s3, | ||
9 | + :s3_credentials => { | ||
10 | + :access_key_id => ENV['S3_KEY'], | ||
11 | + :secret_access_key => ENV['S3_SECRET'] | ||
12 | + }, | ||
13 | + :bucket => ENV['S3_BUCKET'] | ||
7 | <% end -%> | 14 | <% end -%> |
8 | end | 15 | end |