Added doc for #table_exists?

This commit is contained in:
Sebastian Martinez
2011-04-22 20:39:00 -03:00
parent e382d95e1e
commit 616eef33a5

View File

@@ -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