Skip to content

Commit

Permalink
Avoid Rails 5 deprecation. Fixes active-elastic-job#38
Browse files Browse the repository at this point in the history
  • Loading branch information
karensg authored Jul 12, 2016
1 parent 130b7d5 commit a3f95f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/active_elastic_job/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3f95f6

Please sign in to comment.