diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-19 20:19:53 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-19 20:19:53 -0800 |
commit | bd2f5c062da011e092c1f122567f24bd5fc6d9b5 (patch) | |
tree | 968c8e162f67157b4cad826ce1680310e70dd7c1 /activerecord/test/active_record/connection_adapters/fake_adapter.rb | |
parent | 4cdd44e3e0e22742a6e0ddc67c388cee0c8c13db (diff) | |
download | rails-bd2f5c062da011e092c1f122567f24bd5fc6d9b5.tar.gz rails-bd2f5c062da011e092c1f122567f24bd5fc6d9b5.tar.bz2 rails-bd2f5c062da011e092c1f122567f24bd5fc6d9b5.zip |
pushing caching and visitors down to the connection
Diffstat (limited to 'activerecord/test/active_record/connection_adapters/fake_adapter.rb')
-rw-r--r-- | activerecord/test/active_record/connection_adapters/fake_adapter.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/active_record/connection_adapters/fake_adapter.rb b/activerecord/test/active_record/connection_adapters/fake_adapter.rb index 1c2942170e..267ea8bb6b 100644 --- a/activerecord/test/active_record/connection_adapters/fake_adapter.rb +++ b/activerecord/test/active_record/connection_adapters/fake_adapter.rb @@ -9,11 +9,16 @@ module ActiveRecord class FakeAdapter < AbstractAdapter attr_accessor :tables, :primary_keys + @columns = Hash.new { |h,k| h[k] = [] } + class << self + attr_reader :columns + end + def initialize(connection, logger) super @tables = [] @primary_keys = {} - @columns = Hash.new { |h,k| h[k] = [] } + @columns = self.class.columns end def primary_key(table) |