diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-24 12:27:56 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-24 12:27:56 -0700 |
commit | 70625badcf3c3f1be8d14181040099d6ca5f7a2b (patch) | |
tree | 11c6b3ba2d568301755086aee9c163b0fbf5dbca /activerecord/lib | |
parent | 577034decbe790789eaadef493582d164d9431c2 (diff) | |
download | rails-70625badcf3c3f1be8d14181040099d6ca5f7a2b.tar.gz rails-70625badcf3c3f1be8d14181040099d6ca5f7a2b.tar.bz2 rails-70625badcf3c3f1be8d14181040099d6ca5f7a2b.zip |
Drop support for postgres driver. Use pg >= 0.9.0.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index ceb1adc9e0..de89318eff 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -2,26 +2,12 @@ require 'active_record/connection_adapters/abstract_adapter' require 'active_support/core_ext/kernel/requires' require 'active_support/core_ext/object/blank' -begin - require_library_or_gem 'pg' -rescue LoadError => e - begin - require_library_or_gem 'postgres' - class PGresult - alias_method :nfields, :num_fields unless self.method_defined?(:nfields) - alias_method :ntuples, :num_tuples unless self.method_defined?(:ntuples) - alias_method :ftype, :type unless self.method_defined?(:ftype) - alias_method :cmd_tuples, :cmdtuples unless self.method_defined?(:cmd_tuples) - end - rescue LoadError - raise e - end -end - module ActiveRecord class Base # Establishes a connection to the database that's used by all Active Record objects def self.postgresql_connection(config) # :nodoc: + require 'pg' + config = config.symbolize_keys host = config[:host] port = config[:port] || 5432 |