From a3f95f6f9a9d5526fa60978930e0e6e3e09b65b9 Mon Sep 17 00:00:00 2001 From: Karens Date: Tue, 12 Jul 2016 17:12:15 +0200 Subject: [PATCH] Avoid Rails 5 deprecation. Fixes #38 --- lib/active_elastic_job/railtie.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/active_elastic_job/railtie.rb b/lib/active_elastic_job/railtie.rb index 7616e05..a9cea18 100644 --- a/lib/active_elastic_job/railtie.rb +++ b/lib/active_elastic_job/railtie.rb @@ -4,9 +4,9 @@ class Railtie < Rails::Railtie disabled = ENV['DISABLE_SQS_CONSUMER'] if disabled == 'false' || disabled.nil? if app.config.force_ssl - app.config.middleware.insert_before("ActionDispatch::SSL","ActiveElasticJob::Rack::SqsMessageConsumer") + app.config.middleware.insert_before(ActionDispatch::SSL,ActiveElasticJob::Rack::SqsMessageConsumer) else - app.config.middleware.use("ActiveElasticJob::Rack::SqsMessageConsumer") + app.config.middleware.use(ActiveElasticJob::Rack::SqsMessageConsumer) end end end