diff options
author | Ivan Ukhov <uvsoft@gmail.com> | 2010-11-17 08:26:48 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-17 12:48:34 +0800 |
commit | f127338049f7317c238da71fc21b4f318c115a6c (patch) | |
tree | f823de52eab3d9facd11f6803de1353441812f5a /lib | |
parent | 4fdae4aac54f100698a4fd48961a60864fda21a9 (diff) | |
download | rails-f127338049f7317c238da71fc21b4f318c115a6c.tar.gz rails-f127338049f7317c238da71fc21b4f318c115a6c.tar.bz2 rails-f127338049f7317c238da71fc21b4f318c115a6c.zip |
Let table_exists? find tables in @@table_cache even if symbols are passed as their names
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/table.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/table.rb b/lib/arel/table.rb index 61210dae76..83d0951453 100644 --- a/lib/arel/table.rb +++ b/lib/arel/table.rb @@ -8,7 +8,7 @@ module Arel 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 @@ module Arel # 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 |