diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-09 10:18:10 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-09 10:18:10 -0800 |
commit | 007965a6513f2631465cf8477846daf9532dafc4 (patch) | |
tree | bbfdcd429fa51edad8951cd6bb8243d4ab4fea16 /activerecord | |
parent | a29d1dbd59634594385d0303e06a3015dafdcd8f (diff) | |
download | rails-007965a6513f2631465cf8477846daf9532dafc4.tar.gz rails-007965a6513f2631465cf8477846daf9532dafc4.tar.bz2 rails-007965a6513f2631465cf8477846daf9532dafc4.zip |
don't need a begin / end.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 10 |
1 files changed, 4 insertions, 6 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 becdc7ea6e..a905c135f8 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -23,12 +23,10 @@ module ActiveRecord # === Example # table_exists?(:developers) def table_exists?(table_name) - begin - select_value("SELECT 1 FROM #{quote_table_name(table_name)} where 1=0", 'SCHEMA') - true - rescue - false - end + select_value("SELECT 1 FROM #{quote_table_name(table_name)} where 1=0", 'SCHEMA') + true + rescue + false end # Returns an array of indexes for the given table. |