Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Let table_exists? find tables in @@table_cache even if symbols are pa…

…ssed as their names
  • Loading branch information...
commit f127338049f7317c238da71fc21b4f318c115a6c 1 parent 4fdae4a
Ivan Ukhov authored tenderlove committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/arel/table.rb
View
4 lib/arel/table.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.