提交 f1273380 编写于 作者: I Ivan Ukhov 提交者: Aaron Patterson

Let table_exists? find tables in @@table_cache even if symbols are passed as their names

上级 4fdae4aa
......@@ -8,7 +8,7 @@ class << self; attr_accessor :engine; end
attr_accessor :name, :engine, :aliases, :table_alias
def initialize name, engine = Table.engine
@name = name
@name = name.to_s
@engine = engine
@columns = nil
@aliases = []
......@@ -22,7 +22,7 @@ def initialize name, engine = Table.engine
# Sometime AR sends an :as parameter to table, to let the table know
# that it is an Alias. We may want to override new, and return a
# TableAlias node?
@table_alias = engine[:as] unless engine[:as].to_s == name.to_s
@table_alias = engine[:as] unless engine[:as].to_s == name
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册