instance method
table_exists?
Ruby on Rails 5.0.7.2
Since v3.2.22.5 Last seen in v5.0.7.2Signature
table_exists?(table_name)
No documentation comment.
Parameters
-
table_namereq
Source
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 336
def table_exists?(table_name)
# Update lib/active_record/internal_metadata.rb when this gets removed
ActiveSupport::Deprecation.warn(<<-MSG.squish)
#table_exists? currently checks both tables and views.
This behavior is deprecated and will be changed with Rails 5.1 to only check tables.
Use #data_source_exists? instead.
MSG
data_source_exists?(table_name)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb line 336
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter