aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-12-05 14:20:14 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-12-05 14:20:14 -0800
commit8aa7b8695dd90989de699e050b61d755e3a61b19 (patch)
treefe9a500479f8571600e446e7d051342ae10009d0 /activerecord
parent988061ddb802e6803d19de954762753f14551c56 (diff)
downloadrails-8aa7b8695dd90989de699e050b61d755e3a61b19.tar.gz
rails-8aa7b8695dd90989de699e050b61d755e3a61b19.tar.bz2
rails-8aa7b8695dd90989de699e050b61d755e3a61b19.zip
Quitoting the table name before querying.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index 7ff3b755fd..3ced32e42d 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -24,7 +24,7 @@ module ActiveRecord
# table_exists?(:developers)
def table_exists?(table_name)
begin
- select_value("SELECT 1 FROM #{table_name.to_s} where 1=0")
+ select_value("SELECT 1 FROM #{quote_table_name(table_name)} where 1=0")
true
rescue
false