Rescue errors when the postgres adapter isn't in use (h/t to subdigital)

This commit is contained in:
Evgeniy Dolzhenko 2011-04-18 07:59:49 +01:00
parent adffbb682f
commit 0b5075a741

View File

@ -1,6 +1,7 @@
module SilentPostgres
def self.init!
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:include, SilentPostgres)
rescue NameError
end
if defined?(Rails::Railtie)