FIX: only load S3 stuff when we need it

This commit is contained in:
Sam 2015-02-11 10:55:04 +11:00
parent 3cf87b94c9
commit 577f7446b4
1 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,3 @@
require "s3_helper"
class Backup
include UrlHelper
include ActiveModel::SerializerSupport
@ -47,8 +45,8 @@ class Backup
end
def s3
return @s3_helper if @s3_helper
@s3_helper = S3Helper.new(s3_bucket)
require "s3_helper" unless defined? S3Helper
@s3_helper ||= S3Helper.new(s3_bucket)
end
def upload_to_s3