Skip to content

Commit

Permalink
only require apartment PostgreSQLAdapter if were using postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
rpbaltazar committed Feb 3, 2022
1 parent 56f63fd commit b67bc7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/apartment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

require_relative 'apartment/log_subscriber'

require_relative 'apartment/active_record/postgresql_adapter'
if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
require_relative 'apartment/active_record/postgresql_adapter'
end

if ActiveRecord.version.release >= Gem::Version.new('6.0')
require_relative 'apartment/active_record/connection_handling'
end
Expand Down

0 comments on commit b67bc7a

Please sign in to comment.