kreynolds/paperclip — comment on commit 362a337c7f1f8680687ba3076ffd9790e27f81ad
File:  line 0
By sikachu:

I think I'll go the other path and maybe change the call to `AWS::S3::S3Object.*` to call internal private method instead. For example:

```ruby
def expiring_url(time = 3600, style_name = default_style)
AWS::S3::S3Object.url_for(path(style_name), bucket_name, :expires_in => time, :use_ssl => (s3_protocol(style_name) == 'https'))
end

#to

def expiring_url(time = 3600, style_name = default_style)
s3_object.url_for(path(style_name), bucket_name, :expires_in => time, :use_ssl => (s3_protocol(style_name) == 'https'))
end

def s3_object
establish_connection! unless @connection
AWS::S3::S3Object
end
private_method :s3_object
```

But hey, I like the idea. :)