Skip to content

Commit

Permalink
Don't force eager load for Rails 5 (#480)
Browse files Browse the repository at this point in the history
Fixes #467
  • Loading branch information
Tahir Poduska authored and phstc committed Mar 25, 2018
1 parent d5f3cb5 commit bbfa813
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/shoryuken/environment_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ def load_rails
else
# Painful contortions, see 1791 for discussion
require File.expand_path('config/application.rb')
::Rails::Application.initializer 'shoryuken.eager_load' do
::Rails.application.config.eager_load = true
if ::Rails::VERSION::MAJOR == 4
::Rails::Application.initializer 'shoryuken.eager_load' do
::Rails.application.config.eager_load = true
end
end
require 'shoryuken/extensions/active_job_adapter' if Shoryuken.active_job?
require File.expand_path('config/environment.rb')
Expand Down

0 comments on commit bbfa813

Please sign in to comment.