diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-05 14:20:14 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-05 14:20:14 -0800 |
commit | 8aa7b8695dd90989de699e050b61d755e3a61b19 (patch) | |
tree | fe9a500479f8571600e446e7d051342ae10009d0 /activerecord | |
parent | 988061ddb802e6803d19de954762753f14551c56 (diff) | |
download | rails-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.rb | 2 |
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 |