From c94651f8c822f7c0778c03eb36bee5ca19f35911 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 4 Feb 2011 14:52:05 -0800 Subject: almost fisted --- .../active_record/connection_adapters/abstract/connection_pool.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index db745e325f..63cdce5e4d 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -125,6 +125,13 @@ module ActiveRecord @primary_keys.clear end + # Clear out internal caches for table with +table_name+ + def clear_table_cache!(table_name) + @columns.delete table_name + @columns_hash.delete table_name + @primary_keys.delete table_name + end + # Retrieve the connection associated with the current thread, or call # #checkout to obtain one if necessary. # -- cgit v1.2.3