instance method prepare_default_proc

Ruby on Rails 4.0.13

Since v4.0.13 Last seen in v4.1.16 Private

Available in: v4.0.13 v4.1.16

Signature

prepare_default_proc()

No documentation comment.

Source
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 112
      def prepare_default_proc
        @columns.default_proc = Proc.new do |h, table_name|
          h[table_name] = connection.columns(table_name)
        end

        @columns_hash.default_proc = Proc.new do |h, table_name|
          h[table_name] = Hash[columns(table_name).map { |col|
            [col.name, col]
          }]
        end

        @primary_keys.default_proc = Proc.new do |h, table_name|
          h[table_name] = table_exists?(table_name) ? connection.primary_key(table_name) : nil
        end
      end

Defined in activerecord/lib/active_record/connection_adapters/schema_cache.rb line 112 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::SchemaCache

Type at least 2 characters to search.

↑↓ navigate · open · esc close