diff options
author | Sebastian Martinez <sebastian@wyeworks.com> | 2011-04-22 20:39:00 -0300 |
---|---|---|
committer | Sebastian Martinez <sebastian@wyeworks.com> | 2011-04-22 20:39:00 -0300 |
commit | 616eef33a5ffe006609e75b67cadcc4c89ff09b4 (patch) | |
tree | 105e49639c64bcaf6a66411fa9d1bef29a23ec01 /activerecord/lib/active_record | |
parent | e382d95e1e491c48f583d2bf13a9f50d7b3ee6ef (diff) | |
download | rails-616eef33a5ffe006609e75b67cadcc4c89ff09b4.tar.gz rails-616eef33a5ffe006609e75b67cadcc4c89ff09b4.tar.bz2 rails-616eef33a5ffe006609e75b67cadcc4c89ff09b4.zip |
Added doc for #table_exists?
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 4 |
1 files changed, 4 insertions, 0 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 8bae50885f..9a6f36598b 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -17,6 +17,10 @@ module ActiveRecord # def tables(name = nil) end + # Checks to see if the table +table_name+ exists on the database. + # + # === Example + # table_exists?(:developers) def table_exists?(table_name) tables.include?(table_name.to_s) end |