Skip to content

Commit

Permalink
Merge pull request #263 from pifleo/patch-1
Browse files Browse the repository at this point in the history
Update attachment.rb, set back S3/Heroku behavior
  • Loading branch information
fusion94 committed Jun 1, 2013
2 parents e041142 + 0cf5bef commit 89ef4d9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/models/attachment.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Attachment < ActiveRecord::Base
belongs_to :channel
belongs_to :user

=begin
has_attached_file(:file, {
if ENV['S3_BUCKET']
has_attached_file(:file, {
:storage => :s3,
:s3_credentials => {
:access_key_id => ENV['S3_ACCESS_KEY_ID'],
Expand All @@ -14,9 +14,10 @@ class Attachment < ActiveRecord::Base
:url => "/:attachment/:id/:style/:basename.:extension",
:path => "#{ENV['S3_PREFIX']}/:attachment/:id/:style/:basename.:extension"
})
=end

has_attached_file :file
else
has_attached_file :file
end

attr_accessible :file

def url
Expand Down

0 comments on commit 89ef4d9

Please sign in to comment.