instance method table_exists?

Ruby on Rails 3.1.12

Since v3.1.12 Last seen in v3.1.12

Signature

table_exists?(name)

No documentation comment.

Parameters

name req
Source
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 640
      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 640 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Mysql::Stmt::ActiveRecord::ConnectionAdapters::MysqlAdapter

Type at least 2 characters to search.

↑↓ navigate · open · esc close