diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb
index 219f245107b..09ffbdfc13a 100644
--- a/activerecord/lib/active_record/associations/collection_proxy.rb
+++ b/activerecord/lib/active_record/associations/collection_proxy.rb
@@ -2,6 +2,8 @@
module ActiveRecord
module Associations
+ # = Active Record Collection Proxy
+ #
# Collection proxies in Active Record are middlemen between an
# association, and its target result set.
#
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb
index 9a5bc275cae..c9b0eca67c6 100644
--- a/activerecord/lib/active_record/associations/has_many_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_association.rb
@@ -3,6 +3,7 @@
module ActiveRecord
module Associations
# = Active Record Has Many Association
+ #
# This is the proxy that handles a has many association.
#
# If the association has a :through option further specialization
diff --git a/activerecord/lib/active_record/associations/preloader.rb b/activerecord/lib/active_record/associations/preloader.rb
index 5ba35471b73..b65dd339997 100644
--- a/activerecord/lib/active_record/associations/preloader.rb
+++ b/activerecord/lib/active_record/associations/preloader.rb
@@ -4,6 +4,8 @@ require "active_support/core_ext/enumerable"
module ActiveRecord
module Associations
+ # = Active Record \Preloader
+ #
# Implements the details of eager loading of Active Record associations.
#
# Suppose that you have the following two Active Record models:
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb
index 17bfde13f4f..1af3f118466 100644
--- a/activerecord/lib/active_record/attribute_methods/dirty.rb
+++ b/activerecord/lib/active_record/attribute_methods/dirty.rb
@@ -4,6 +4,7 @@ require "active_support/core_ext/module/attribute_accessors"
module ActiveRecord
module AttributeMethods
+ # = Active Record Attribute Methods \Dirty
module Dirty
extend ActiveSupport::Concern
diff --git a/activerecord/lib/active_record/attribute_methods/primary_key.rb b/activerecord/lib/active_record/attribute_methods/primary_key.rb
index 6f1f900ea41..0dc792f452d 100644
--- a/activerecord/lib/active_record/attribute_methods/primary_key.rb
+++ b/activerecord/lib/active_record/attribute_methods/primary_key.rb
@@ -4,6 +4,7 @@ require "set"
module ActiveRecord
module AttributeMethods
+ # = Active Record Attribute Methods Primary Key
module PrimaryKey
extend ActiveSupport::Concern
diff --git a/activerecord/lib/active_record/attribute_methods/query.rb b/activerecord/lib/active_record/attribute_methods/query.rb
index 1430d8da753..f24ffa1c6ff 100644
--- a/activerecord/lib/active_record/attribute_methods/query.rb
+++ b/activerecord/lib/active_record/attribute_methods/query.rb
@@ -2,6 +2,7 @@
module ActiveRecord
module AttributeMethods
+ # = Active Record Attribute Methods \Query
module Query
extend ActiveSupport::Concern
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 9f245109a47..f082f9061b7 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -2,6 +2,7 @@
module ActiveRecord
module AttributeMethods
+ # = Active Record Attribute Methods \Read
module Read
extend ActiveSupport::Concern
diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb
index 316aeae75fe..7164767c3cb 100644
--- a/activerecord/lib/active_record/attribute_methods/serialization.rb
+++ b/activerecord/lib/active_record/attribute_methods/serialization.rb
@@ -2,6 +2,7 @@
module ActiveRecord
module AttributeMethods
+ # = Active Record Attribute Methods \Serialization
module Serialization
extend ActiveSupport::Concern
diff --git a/activerecord/lib/active_record/attribute_methods/write.rb b/activerecord/lib/active_record/attribute_methods/write.rb
index ff52ed56d75..304bbce6760 100644
--- a/activerecord/lib/active_record/attribute_methods/write.rb
+++ b/activerecord/lib/active_record/attribute_methods/write.rb
@@ -2,6 +2,7 @@
module ActiveRecord
module AttributeMethods
+ # = Active Record Attribute Methods \Write
module Write
extend ActiveSupport::Concern
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb
index 08f80dfba02..15e46907b96 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb
@@ -5,6 +5,8 @@ require "concurrent/map"
module ActiveRecord
module ConnectionAdapters
+ # = Active Record Connection Adapters Connection Handler
+ #
# ConnectionHandler is a collection of ConnectionPool objects. It is used
# for keeping separate connection pools that connect to different databases.
#
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index 66b61208c57..7d9b79d408e 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -49,6 +49,8 @@ module ActiveRecord
end
end
+ # = Active Record Connection Pool
+ #
# Connection pool base class for managing Active Record database
# connections.
#
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb
index 9250caa91ac..263b2a82be6 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb
@@ -6,6 +6,8 @@ require "monitor"
module ActiveRecord
module ConnectionAdapters
class ConnectionPool
+ # = Active Record Connection Pool \Queue
+ #
# Threadsafe, fair, LIFO queue. Meant to be used by ConnectionPool
# with which it shares a Monitor.
class Queue
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb
index 0bff96e1717..e5b80ba2a68 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb
@@ -6,6 +6,8 @@ require "weakref"
module ActiveRecord
module ConnectionAdapters
class ConnectionPool
+ # = Active Record Connection Pool \Reaper
+ #
# Every +frequency+ seconds, the reaper will call +reap+ and +flush+ on
# +pool+. A reaper instantiated with a zero frequency will never reap
# the connection pool.
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
index d312c0a3b3d..5b478139bae 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
@@ -5,6 +5,7 @@ require "active_support/multibyte/chars"
module ActiveRecord
module ConnectionAdapters # :nodoc:
+ # = Active Record Connection Adapters \Quoting
module Quoting
# Quotes the column value to help prevent
# {SQL injection attacks}[https://en.wikipedia.org/wiki/SQL_injection].
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb b/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb
index ab143f07e58..fbfe923f580 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb
@@ -2,6 +2,7 @@
module ActiveRecord
module ConnectionAdapters
+ # = Active Record Connection Adapters \Savepoints
module Savepoints
def current_savepoint_name
current_transaction.savepoint_name
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
index 73ce797ede2..964d83d7c27 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -337,6 +337,8 @@ module ActiveRecord
end
end
+ # = Active Record Connection Adapters \Table \Definition
+ #
# Represents the schema of an SQL table in an abstract way. This class
# provides methods for manipulating the schema representation.
#
@@ -652,6 +654,8 @@ module ActiveRecord
end
end
+ # = Active Record Connection Adapters \Table
+ #
# Represents an SQL table in an abstract way for updating a table.
# Also see TableDefinition and {connection.create_table}[rdoc-ref:SchemaStatements#create_table]
#
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb b/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
index 4256354a6eb..fcab8efef7d 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
@@ -2,6 +2,7 @@
module ActiveRecord
module ConnectionAdapters
+ # = Active Record Connection Adapters Transaction State
class TransactionState
def initialize(state = nil)
@state = state
@@ -254,6 +255,7 @@ module ActiveRecord
end
end
+ # = Active Record Restart Parent \Transaction
class RestartParentTransaction < Transaction
def initialize(connection, parent_transaction, **options)
super(connection, **options)
@@ -281,6 +283,7 @@ module ActiveRecord
def full_rollback?; false; end
end
+ # = Active Record Savepoint \Transaction
class SavepointTransaction < Transaction
def initialize(connection, savepoint_name, parent_transaction, **options)
super(connection, **options)
@@ -318,6 +321,7 @@ module ActiveRecord
def full_rollback?; false; end
end
+ # = Active Record Real \Transaction
class RealTransaction < Transaction
def materialize!
if isolation_level
diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb
index 9d6da3dbf08..33669cd7c2d 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb
@@ -57,6 +57,7 @@ module ActiveRecord
end
end
+ # = Active Record MySQL Adapter \Table Definition
class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
include ColumnMethods
@@ -102,6 +103,7 @@ module ActiveRecord
end
end
+ # = Active Record MySQL Adapter \Table
class Table < ActiveRecord::ConnectionAdapters::Table
include ColumnMethods
end
diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
index bd93083d3ec..4ec4f8f229c 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -19,6 +19,7 @@ module ActiveRecord
end
module ConnectionAdapters
+ # = Active Record MySQL2 Adapter
class Mysql2Adapter < AbstractMysqlAdapter
ER_BAD_DB_ERROR = 1049
ER_ACCESS_DENIED_ERROR = 1045
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb
index 8b344bd8915..fac66bd03d2 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb
@@ -229,6 +229,7 @@ module ActiveRecord
end
end
+ # = Active Record PostgreSQL Adapter \Table Definition
class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
include ColumnMethods
@@ -286,6 +287,7 @@ module ActiveRecord
end
end
+ # = Active Record PostgreSQL Adapter \Table
class Table < ActiveRecord::ConnectionAdapters::Table
include ColumnMethods
@@ -326,6 +328,7 @@ module ActiveRecord
end
end
+ # = Active Record PostgreSQL Adapter Alter \Table
class AlterTable < ActiveRecord::ConnectionAdapters::AlterTable
attr_reader :constraint_validations, :exclusion_constraint_adds, :exclusion_constraint_drops, :unique_key_adds, :unique_key_drops
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index ee2ea08e162..116b078cc3d 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -32,6 +32,8 @@ module ActiveRecord
end
module ConnectionAdapters
+ # = Active Record PostgreSQL Adapter
+ #
# The PostgreSQL adapter works with the native C (https://github.com/ged/ruby-pg) driver.
#
# Options:
diff --git a/activerecord/lib/active_record/connection_adapters/schema_cache.rb b/activerecord/lib/active_record/connection_adapters/schema_cache.rb
index 48bc1968019..a9647e22d7d 100644
--- a/activerecord/lib/active_record/connection_adapters/schema_cache.rb
+++ b/activerecord/lib/active_record/connection_adapters/schema_cache.rb
@@ -4,6 +4,7 @@ require "active_support/core_ext/file/atomic"
module ActiveRecord
module ConnectionAdapters
+ # = Active Record Connection Adapters Schema Cache
class SchemaCache
def self.load_from(filename)
return unless File.file?(filename)
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb
index c9855019c18..d6c55ddde1a 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb
@@ -3,6 +3,7 @@
module ActiveRecord
module ConnectionAdapters
module SQLite3
+ # = Active Record SQLite3 Adapter \Table Definition
class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
def references(*args, **options)
super(*args, type: :integer, **options)
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
index dbf31f1e7ea..af9ad46601f 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
@@ -26,6 +26,8 @@ module ActiveRecord
end
module ConnectionAdapters # :nodoc:
+ # = Active Record SQLite3 Adapter
+ #
# The SQLite3 adapter works with the sqlite3-ruby drivers
# (available as gem from https://rubygems.org/gems/sqlite3).
#
diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb
index 7e736d96474..b054d86abfb 100644
--- a/activerecord/lib/active_record/connection_handling.rb
+++ b/activerecord/lib/active_record/connection_handling.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
module ActiveRecord
+ # = Active Record Connection Handling
module ConnectionHandling
RAILS_ENV = -> { (Rails.env if defined?(Rails.env)) || ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence }
DEFAULT_ENV = -> { RAILS_ENV.call || "default_env" }
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index d90b284e584..60bc23ef7c9 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -7,6 +7,7 @@ require "active_support/parameter_filter"
require "concurrent/map"
module ActiveRecord
+ # = Active Record \Core
module Core
extend ActiveSupport::Concern
include ActiveModel::Access
diff --git a/activerecord/lib/active_record/database_configurations.rb b/activerecord/lib/active_record/database_configurations.rb
index 8f300bff08d..a56e2464e22 100644
--- a/activerecord/lib/active_record/database_configurations.rb
+++ b/activerecord/lib/active_record/database_configurations.rb
@@ -7,6 +7,8 @@ require "active_record/database_configurations/url_config"
require "active_record/database_configurations/connection_url_resolver"
module ActiveRecord
+ # = Active Record Database Configurations
+ #
# ActiveRecord::DatabaseConfigurations returns an array of DatabaseConfig
# objects that are constructed from the application's database
# configuration hash or URL string.
diff --git a/activerecord/lib/active_record/database_configurations/hash_config.rb b/activerecord/lib/active_record/database_configurations/hash_config.rb
index af5f2e43f4c..4d436340e76 100644
--- a/activerecord/lib/active_record/database_configurations/hash_config.rb
+++ b/activerecord/lib/active_record/database_configurations/hash_config.rb
@@ -2,6 +2,8 @@
module ActiveRecord
class DatabaseConfigurations
+ # = Active Record Database Hash Config
+ #
# A HashConfig object is created for each database configuration entry that
# is created from a hash.
#
diff --git a/activerecord/lib/active_record/database_configurations/url_config.rb b/activerecord/lib/active_record/database_configurations/url_config.rb
index 9498f531262..71f726dfa4f 100644
--- a/activerecord/lib/active_record/database_configurations/url_config.rb
+++ b/activerecord/lib/active_record/database_configurations/url_config.rb
@@ -2,6 +2,8 @@
module ActiveRecord
class DatabaseConfigurations
+ # = Active Record Database Url Config
+ #
# A UrlConfig object is created for each database configuration
# entry that is created from a URL. This can either be a URL string
# or a hash with a URL in place of the config hash.
diff --git a/activerecord/lib/active_record/destroy_association_async_job.rb b/activerecord/lib/active_record/destroy_association_async_job.rb
index 68280675ca5..b54ed448b62 100644
--- a/activerecord/lib/active_record/destroy_association_async_job.rb
+++ b/activerecord/lib/active_record/destroy_association_async_job.rb
@@ -4,6 +4,8 @@ module ActiveRecord
class DestroyAssociationAsyncError < StandardError
end
+ # = Active Record Destroy Association Async Job
+ #
# Job to destroy the records associated with a destroyed record in background.
class DestroyAssociationAsyncJob < ActiveJob::Base
queue_as { ActiveRecord.queues[:destroy] }