aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb10
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.