Skip to content

Commit

Permalink
Fix Rails::VERSION check for sinatra and ActiveRecord (#4433)
Browse files Browse the repository at this point in the history
4432
  • Loading branch information
ThomasKoppensteiner authored and mperham committed Jan 15, 2020
1 parent c00f8e7 commit ec3e138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sidekiq/middleware/server/active_record.rb
Expand Up @@ -7,7 +7,7 @@ class ActiveRecord
def initialize
# With Rails 5+ we must use the Reloader **always**.
# The reloader handles code loading and db connection management.
if defined?(::Rails) && ::Rails::VERSION::MAJOR >= 5
if defined?(::Rails) && defined?(::Rails::VERSION) && ::Rails::VERSION::MAJOR >= 5
raise ArgumentError, "Rails 5 no longer needs or uses the ActiveRecord middleware."
end
end
Expand Down

0 comments on commit ec3e138

Please sign in to comment.