mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Added doc for #table_exists?
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user