instance method
table_exists?
Ruby on Rails 7.1.6
Since v3.2.22.5Signature
table_exists?()
Indicates whether the table associated with this class exists
Source
# File activerecord/lib/active_record/model_schema.rb, line 412
def table_exists?
connection.schema_cache.data_source_exists?(table_name)
end
Defined in activerecord/lib/active_record/model_schema.rb line 412
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ModelSchema::ClassMethods