1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

call the columns hash method

This commit is contained in:
Aaron Patterson 2013-03-14 22:22:34 -07:00
parent 6c2e2ac6c7
commit 425925b1c6
2 changed files with 8 additions and 4 deletions

View file

@ -147,11 +147,11 @@ key on UpdateManager using UpdateManager#key=
return nil unless table_exists? table
column_cache[table][name]
column_cache(table)[name]
end
def column_cache
@schema_cache.columns_hash
def column_cache(table)
@schema_cache.columns_hash(table)
end
def visit_Arel_Nodes_Values o

View file

@ -3,7 +3,7 @@ module FakeRecord
end
class Connection
attr_reader :tables, :columns_hash
attr_reader :tables
attr_accessor :visitor
def initialize(visitor = nil)
@ -31,6 +31,10 @@ module FakeRecord
@visitor = visitor
end
def columns_hash table_name
@columns_hash[table_name]
end
def primary_key name
@primary_keys[name.to_s]
end