From 577f7446b4d899b70f71435920b6654b7c602ce0 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 11 Feb 2015 10:55:04 +1100 Subject: [PATCH] FIX: only load S3 stuff when we need it --- app/models/backup.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/backup.rb b/app/models/backup.rb index 2fb0c8061..8b2b27d80 100644 --- a/app/models/backup.rb +++ b/app/models/backup.rb @@ -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