instance method
table_exists?
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v3.0.20Signature
table_exists?(name)
No documentation comment.
Parameters
-
namereq
Source
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 417
def table_exists?(name)
return true if super
name = name.to_s
schema, table = name.split('.', 2)
unless table # A table was provided without a schema
table = schema
schema = nil
end
tables(nil, schema).include? table
end
Defined in activerecord/lib/active_record/connection_adapters/mysql_adapter.rb line 417
· View on GitHub
· Improve this page
· Find usages on GitHub