module ActiveRecord
Active Record – Object-relational mapping in Rails
Active Record connects classes to relational database tables to establish an almost zero-configuration persistence layer for applications. The library provides a base class that, when subclassed, sets up a mapping between the new class and an existing table in the database. In the context of an application, these classes are commonly referred to as models. Models can also be connected to other models; this is done by defining associations.
Active Record relies heavily on naming in that it uses class and association names to establish mappings between respective database tables and foreign key columns. Although these mappings can be defined explicitly, it’s recommended to follow naming conventions, especially when getting started with the library.
You can read more about Active Record in the Active Record Basics guide.
A short rundown of some of the major features:
-
Automated mapping between classes and tables, attributes and columns.
class Product < ActiveRecord::Base end
The Product class is automatically mapped to the table named “products”, which might look like this:
CREATE TABLE products ( id bigint NOT NULL auto_increment, name varchar(255), PRIMARY KEY (id) );
This would also define the following accessors:
Product#name
andProduct#name=(new_name)
. -
Associations between objects defined by simple class methods.
class Firm < ActiveRecord::Base has_many :clients has_one :account belongs_to :conglomerate end
-
Aggregations of value objects.
class Account < ActiveRecord::Base composed_of :balance, class_name: 'Money', mapping: %w(balance amount) composed_of :address, mapping: [%w(address_street street), %w(address_city city)] end
-
Validation rules that can differ for new or existing objects.
class Account < ActiveRecord::Base validates :subdomain, :name, :email_address, :password, presence: true validates :subdomain, uniqueness: true validates :terms_of_service, acceptance: true, on: :create validates :password, :email_address, confirmation: true, on: :create end
-
Callbacks available for the entire life cycle (instantiation, saving, destroying, validating, etc.).
class Person < ActiveRecord::Base before_destroy :invalidate_payment_plan # the `invalidate_payment_plan` method gets called just before Person#destroy end
-
Inheritance hierarchies.
class Company < ActiveRecord::Base; end class Firm < Company; end class Client < Company; end class PriorityClient < Client; end
-
Transactions.
# Database transaction Account.transaction do david.withdrawal(100) mary.deposit(100) end
-
Reflections on columns, associations, and aggregations.
reflection = Firm.reflect_on_association(:clients) reflection.klass # => Client (class) Firm.columns # Returns an array of column descriptors for the firms table
-
Database abstraction through simple adapters.
# connect to SQLite3 ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: 'dbfile.sqlite3') # connect to MySQL with authentication ActiveRecord::Base.establish_connection( adapter: 'mysql2', host: 'localhost', username: 'me', password: 'secret', database: 'activerecord' )
Learn more and read about the built-in support for MySQL, PostgreSQL, and SQLite3.
-
Logging support for Log4r and Logger.
ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT) ActiveRecord::Base.logger = Log4r::Logger.new('Application Log')
-
Database agnostic schema management with Migrations.
class AddSystemSettings < ActiveRecord::Migration[7.2] def up create_table :system_settings do |t| t.string :name t.string :label t.text :value t.string :type t.integer :position end SystemSetting.create name: 'notice', label: 'Use notice?', value: 1 end def down drop_table :system_settings end end
Philosophy
Active Record is an implementation of the object-relational mapping (ORM) pattern by the same name described by Martin Fowler:
“An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.”
Active Record attempts to provide a coherent wrapper as a solution for the inconvenience that is object-relational mapping. The prime directive for this mapping has been to minimize the amount of code needed to build a real-world domain model. This is made possible by relying on a number of conventions that make it easy for Active Record to infer complex relations and structures from a minimal amount of explicit direction.
Convention over Configuration:
-
No XML files!
-
Lots of reflection and run-time extension
-
Magic is not inherently a bad word
Admit the Database:
-
Lets you drop down to SQL for odd cases and performance
-
Doesn’t attempt to duplicate or replace data definitions
Download and installation
The latest version of Active Record can be installed with RubyGems:
$ gem install activerecord
Source code can be downloaded as part of the Rails project on GitHub:
License
Active Record is released under the MIT license:
Support
API documentation is at:
Bug reports for the Ruby on Rails project can be filed here:
Feature requests should be discussed on the rails-core mailing list here:
Inherits From
Constants
MigrationProxy
MigrationProxy
is used to defer loading of the actual migration classes until they are needed
Struct.new(:name, :version, :filename, :scope) do
def initialize(name, version, filename, scope)
super
@migration = nil
end
def basename
File.basename(filename)
end
delegate :migrate, :announce, :write, :disable_ddl_transaction, to: :migration
private
def migration
@migration ||= load_migration
end
def load_migration
Object.send(:remove_const, name) rescue nil
load(File.expand_path(filename))
name.constantize.new(name, version)
end
end
Point
Struct.new(:x, :y)
UnknownAttributeError
Active Model UnknownAttributeError
Raised when unknown attributes are supplied via mass assignment.
class Person
include ActiveModel::AttributeAssignment
include ActiveModel::Validations
end
person = Person.new
person.assign_attributes(name: 'Gorby')
# => ActiveModel::UnknownAttributeError: unknown attribute 'name' for Person.
ActiveModel::UnknownAttributeError
Attributes
[RW] | application_record_class |
|
[RW] | async_query_executor |
|
[RW] | before_committed_on_all_records |
|
[RW] | belongs_to_required_validates_foreign_key |
|
[RW] | commit_transaction_on_non_local_return |
|
[R] | db_warnings_action |
|
[RW] | db_warnings_ignore |
|
[R] | default_timezone |
|
[RW] | disable_prepared_statements |
|
[RW] | index_nested_attribute_errors |
|
[RW] | lazily_load_schema_cache |
|
[RW] | maintain_test_schema |
|
[RW] | query_transformers |
|
[RW] | raise_on_assign_to_attr_readonly |
|
[RW] | reading_role |
|
[RW] | run_after_transaction_callbacks_in_order_defined |
|
[RW] | schema_cache_ignored_tables |
|
[RW] | writing_role |
Public class methods
Source code GitHub
# File activerecord/lib/active_record.rb, line 214
def self.db_warnings_action=(action)
@db_warnings_action =
case action
when :ignore
nil
when :log
->(warning) do
warning_message = "[#{warning.class}] #{warning.message}"
warning_message += " (#{warning.code})" if warning.code
ActiveRecord::Base.logger.warn(warning_message)
end
when :raise
->(warning) { raise warning }
when :report
->(warning) { Rails.error.report(warning, handled: true) }
when Proc
action
else
raise ArgumentError, "db_warnings_action must be one of :ignore, :log, :raise, :report, or a custom proc."
end
end
Determines whether to use Time.utc (using :utc) or Time.local (using :local) when pulling dates and times from the database. This is set to :utc by default.
Source code GitHub
# File activerecord/lib/active_record.rb, line 199
def self.default_timezone=(default_timezone)
unless %i(local utc).include?(default_timezone)
raise ArgumentError, "default_timezone must be either :utc (default) or :local."
end
@default_timezone = default_timezone
end
Explicitly closes all database connections in all pools.
Source code GitHub
# File activerecord/lib/active_record.rb, line 507
def self.disconnect_all!
ConnectionAdapters::PoolConfig.disconnect_all!
end
Source code GitHub
# File activerecord/lib/active_record.rb, line 496
def self.eager_load!
super
ActiveRecord::Locking.eager_load!
ActiveRecord::Scoping.eager_load!
ActiveRecord::Associations.eager_load!
ActiveRecord::AttributeMethods.eager_load!
ActiveRecord::ConnectionAdapters.eager_load!
ActiveRecord::Encryption.eager_load!
end
Returns the currently loaded version of Active Record as a Gem::Version
.
Source code GitHub
# File activerecord/lib/active_record/gem_version.rb, line 5
def self.gem_version
Gem::Version.new VERSION::STRING
end
Set the global_executor_concurrency
. This configuration value can only be used with the global thread pool async query executor.
Source code GitHub
# File activerecord/lib/active_record.rb, line 281
def self.global_executor_concurrency=(global_executor_concurrency)
if self.async_query_executor.nil? || self.async_query_executor == :multi_thread_pool
raise ArgumentError, "`global_executor_concurrency` cannot be set when using the executor is nil or set to multi_thead_pool. For multiple thread pools, please set the concurrency in your database configuration."
end
@global_executor_concurrency = global_executor_concurrency
end
Source code GitHub
# File activerecord/lib/active_record.rb, line 248
def self.legacy_connection_handling=(_)
raise ArgumentError, <<~MSG.squish
The `legacy_connection_handling` setter was deprecated in 7.0 and removed in 7.1,
but is still defined in your configuration. Please remove this call as it no longer
has any effect."
MSG
end
Source code GitHub
# File activerecord/lib/active_record.rb, line 460
def self.marshalling_format_version
Marshalling.format_version
end
Source code GitHub
# File activerecord/lib/active_record.rb, line 464
def self.marshalling_format_version=(value)
Marshalling.format_version = value
end
Source code GitHub
# File activerecord/lib/active_record.rb, line 398
def self.suppress_multiple_database_warning
ActiveRecord.deprecator.warn(<<-MSG.squish)
config.active_record.suppress_multiple_database_warning is deprecated and will be removed in Rails 7.2.
It no longer has any effect and should be removed from the configuration file.
MSG
end
Source code GitHub
# File activerecord/lib/active_record.rb, line 405
def self.suppress_multiple_database_warning=(value)
ActiveRecord.deprecator.warn(<<-MSG.squish)
config.active_record.suppress_multiple_database_warning= is deprecated and will be removed in Rails 7.2.
It no longer has any effect and should be removed from the configuration file.
MSG
end
Specifies if the methods calling database queries should be logged below their relevant queries. Defaults to false.
Source code GitHub
# File activerecord/lib/active_record.rb, line 301
singleton_class.attr_accessor :verbose_query_logs
Returns the currently loaded version of Active Record as a Gem::Version
.
Source code GitHub
# File activerecord/lib/active_record/version.rb, line 7
def self.version
gem_version
end
Namespace
ActiveRecord::
ActiveRecordError ActiveRecord::
AdapterError ActiveRecord::
AdapterNotFound ActiveRecord::
AdapterNotSpecified ActiveRecord::
AdapterTimeout ActiveRecord::
Aggregations ActiveRecord::
Assertions ActiveRecord::
AssociationTypeMismatch ActiveRecord::
Associations ActiveRecord::
AsynchronousQueryInsideTransactionError ActiveRecord::
AttributeAssignment ActiveRecord::
AttributeAssignmentError ActiveRecord::
AttributeMethods ActiveRecord::
Attributes ActiveRecord::
AutosaveAssociation ActiveRecord::
Base ActiveRecord::
Batches ActiveRecord::
Calculations ActiveRecord::
Callbacks ActiveRecord::
Coders ActiveRecord::
ConfigurationError ActiveRecord::
ConnectionAdapters ActiveRecord::
ConnectionFailed ActiveRecord::
ConnectionHandling ActiveRecord::
ConnectionNotEstablished ActiveRecord::
ConnectionTimeoutError ActiveRecord::
Core ActiveRecord::
CounterCache ActiveRecord::
DangerousAttributeError ActiveRecord::
DatabaseAlreadyExists ActiveRecord::
DatabaseConfigurations ActiveRecord::
DatabaseConnectionError ActiveRecord::
Deadlocked ActiveRecord::
DelegatedType ActiveRecord::
DestroyAssociationAsyncError ActiveRecord::
DestroyAssociationAsyncJob ActiveRecord::
DynamicMatchers ActiveRecord::
EagerLoadPolymorphicError ActiveRecord::
Encryption ActiveRecord::
Enum ActiveRecord::
EnvironmentMismatchError ActiveRecord::
ExclusiveConnectionTimeoutError ActiveRecord::
Explain ActiveRecord::
FinderMethods ActiveRecord::
FixtureSet ActiveRecord::
FutureResult ActiveRecord::
ImmutableRelation ActiveRecord::
Inheritance ActiveRecord::
Integration ActiveRecord::
InvalidForeignKey ActiveRecord::
IrreversibleMigration ActiveRecord::
IrreversibleOrderError ActiveRecord::
LockWaitTimeout ActiveRecord::
Locking ActiveRecord::
LogSubscriber ActiveRecord::
Marshalling ActiveRecord::
MessagePack ActiveRecord::
Middleware ActiveRecord::
Migration ActiveRecord::
MigrationContext ActiveRecord::
MismatchedForeignKey ActiveRecord::
ModelSchema ActiveRecord::
MultiparameterAssignmentErrors ActiveRecord::
NestedAttributes ActiveRecord::
NoDatabaseError ActiveRecord::
NoTouching ActiveRecord::
Normalization ActiveRecord::
NotNullViolation ActiveRecord::
Persistence ActiveRecord::
PreparedStatementCacheExpired ActiveRecord::
PreparedStatementInvalid ActiveRecord::
Promise ActiveRecord::
QueryAborted ActiveRecord::
QueryCache ActiveRecord::
QueryCanceled ActiveRecord::
QueryLogs ActiveRecord::
QueryMethods ActiveRecord::
Querying ActiveRecord::
RangeError ActiveRecord::
ReadOnlyError ActiveRecord::
ReadOnlyRecord ActiveRecord::
ReadonlyAttributeError ActiveRecord::
ReadonlyAttributes ActiveRecord::
RecordInvalid ActiveRecord::
RecordNotDestroyed ActiveRecord::
RecordNotFound ActiveRecord::
RecordNotSaved ActiveRecord::
RecordNotUnique ActiveRecord::
Reflection ActiveRecord::
Relation ActiveRecord::
Result ActiveRecord::
Rollback ActiveRecord::
SQLWarning ActiveRecord::
Sanitization ActiveRecord::
Schema ActiveRecord::
Scoping ActiveRecord::
SecurePassword ActiveRecord::
SecureToken ActiveRecord::
Serialization ActiveRecord::
SerializationFailure ActiveRecord::
SerializationTypeMismatch ActiveRecord::
SignedId ActiveRecord::
SoleRecordExceeded ActiveRecord::
SpawnMethods ActiveRecord::
StaleObjectError ActiveRecord::
StatementCache ActiveRecord::
StatementInvalid ActiveRecord::
StatementTimeout ActiveRecord::
Store ActiveRecord::
StrictLoadingViolationError ActiveRecord::
SubclassNotFound ActiveRecord::
Suppressor ActiveRecord::
TableNotSpecified ActiveRecord::
Tasks ActiveRecord::
TestFixtures ActiveRecord::
Timestamp ActiveRecord::
TokenFor ActiveRecord::
TransactionIsolationError ActiveRecord::
TransactionRollbackError ActiveRecord::
Transactions ActiveRecord::
Translation ActiveRecord::
Type ActiveRecord::
UnknownAttributeError ActiveRecord::
UnknownAttributeReference ActiveRecord::
UnknownPrimaryKey ActiveRecord::
VERSION ActiveRecord::
Validations ActiveRecord::
ValueTooLong ActiveRecord::
WrappedDatabaseException
Definition files
activerecord/
lib/ active_record.rb activerecord/
lib/ active_record/ aggregations.rb activerecord/
lib/ active_record/ association_relation.rb activerecord/
lib/ active_record/ associations.rb activerecord/
lib/ active_record/ associations/ alias_tracker.rb
296 More Less
activerecord/
lib/ active_record/ associations/ association.rb activerecord/
lib/ active_record/ associations/ association_scope.rb activerecord/
lib/ active_record/ associations/ belongs_to_association.rb activerecord/
lib/ active_record/ associations/ belongs_to_polymorphic_association.rb activerecord/
lib/ active_record/ associations/ builder/ association.rb activerecord/
lib/ active_record/ associations/ builder/ belongs_to.rb activerecord/
lib/ active_record/ associations/ builder/ collection_association.rb activerecord/
lib/ active_record/ associations/ builder/ has_and_belongs_to_many.rb activerecord/
lib/ active_record/ associations/ builder/ has_many.rb activerecord/
lib/ active_record/ associations/ builder/ has_one.rb activerecord/
lib/ active_record/ associations/ builder/ singular_association.rb activerecord/
lib/ active_record/ associations/ collection_association.rb activerecord/
lib/ active_record/ associations/ collection_proxy.rb activerecord/
lib/ active_record/ associations/ disable_joins_association_scope.rb activerecord/
lib/ active_record/ associations/ foreign_association.rb activerecord/
lib/ active_record/ associations/ has_many_association.rb activerecord/
lib/ active_record/ associations/ has_many_through_association.rb activerecord/
lib/ active_record/ associations/ has_one_association.rb activerecord/
lib/ active_record/ associations/ has_one_through_association.rb activerecord/
lib/ active_record/ associations/ join_dependency.rb activerecord/
lib/ active_record/ associations/ join_dependency/ join_association.rb activerecord/
lib/ active_record/ associations/ join_dependency/ join_base.rb activerecord/
lib/ active_record/ associations/ join_dependency/ join_part.rb activerecord/
lib/ active_record/ associations/ preloader.rb activerecord/
lib/ active_record/ associations/ preloader/ batch.rb activerecord/
lib/ active_record/ associations/ preloader/ branch.rb activerecord/
lib/ active_record/ associations/ preloader/ through_association.rb activerecord/
lib/ active_record/ associations/ singular_association.rb activerecord/
lib/ active_record/ associations/ through_association.rb activerecord/
lib/ active_record/ asynchronous_queries_tracker.rb activerecord/
lib/ active_record/ attribute_assignment.rb activerecord/
lib/ active_record/ attribute_methods.rb activerecord/
lib/ active_record/ attribute_methods/ before_type_cast.rb activerecord/
lib/ active_record/ attribute_methods/ composite_primary_key.rb activerecord/
lib/ active_record/ attribute_methods/ dirty.rb activerecord/
lib/ active_record/ attribute_methods/ primary_key.rb activerecord/
lib/ active_record/ attribute_methods/ query.rb activerecord/
lib/ active_record/ attribute_methods/ read.rb activerecord/
lib/ active_record/ attribute_methods/ serialization.rb activerecord/
lib/ active_record/ attribute_methods/ time_zone_conversion.rb activerecord/
lib/ active_record/ attribute_methods/ write.rb activerecord/
lib/ active_record/ attributes.rb activerecord/
lib/ active_record/ autosave_association.rb activerecord/
lib/ active_record/ base.rb activerecord/
lib/ active_record/ callbacks.rb activerecord/
lib/ active_record/ coders/ column_serializer.rb activerecord/
lib/ active_record/ coders/ json.rb activerecord/
lib/ active_record/ coders/ yaml_column.rb activerecord/
lib/ active_record/ connection_adapters.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ connection_handler.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ connection_pool.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ connection_pool/ queue.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ connection_pool/ reaper.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ database_limits.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ database_statements.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ query_cache.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ quoting.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ savepoints.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ schema_creation.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ schema_definitions.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ schema_dumper.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ schema_statements.rb activerecord/
lib/ active_record/ connection_adapters/ abstract/ transaction.rb activerecord/
lib/ active_record/ connection_adapters/ abstract_adapter.rb activerecord/
lib/ active_record/ connection_adapters/ abstract_mysql_adapter.rb activerecord/
lib/ active_record/ connection_adapters/ column.rb activerecord/
lib/ active_record/ connection_adapters/ deduplicable.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ column.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ database_statements.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ explain_pretty_printer.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ quoting.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ schema_creation.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ schema_definitions.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ schema_dumper.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ schema_statements.rb activerecord/
lib/ active_record/ connection_adapters/ mysql/ type_metadata.rb activerecord/
lib/ active_record/ connection_adapters/ mysql2/ database_statements.rb activerecord/
lib/ active_record/ connection_adapters/ mysql2_adapter.rb activerecord/
lib/ active_record/ connection_adapters/ pool_config.rb activerecord/
lib/ active_record/ connection_adapters/ pool_manager.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ column.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ database_statements.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ explain_pretty_printer.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ array.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ bit.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ bit_varying.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ bytea.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ cidr.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ date.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ date_time.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ decimal.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ enum.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ hstore.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ inet.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ interval.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ jsonb.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ legacy_point.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ macaddr.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ money.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ oid.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ point.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ range.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ specialized_string.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ timestamp.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ timestamp_with_time_zone.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ type_map_initializer.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ uuid.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ vector.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ oid/ xml.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ quoting.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ referential_integrity.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ schema_creation.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ schema_definitions.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ schema_dumper.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ schema_statements.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ type_metadata.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql/ utils.rb activerecord/
lib/ active_record/ connection_adapters/ postgresql_adapter.rb activerecord/
lib/ active_record/ connection_adapters/ schema_cache.rb activerecord/
lib/ active_record/ connection_adapters/ sql_type_metadata.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3/ column.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3/ database_statements.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3/ explain_pretty_printer.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3/ quoting.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3/ schema_creation.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3/ schema_definitions.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3/ schema_dumper.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3/ schema_statements.rb activerecord/
lib/ active_record/ connection_adapters/ sqlite3_adapter.rb activerecord/
lib/ active_record/ connection_adapters/ statement_pool.rb activerecord/
lib/ active_record/ connection_adapters/ trilogy/ database_statements.rb activerecord/
lib/ active_record/ connection_adapters/ trilogy_adapter.rb activerecord/
lib/ active_record/ connection_handling.rb activerecord/
lib/ active_record/ core.rb activerecord/
lib/ active_record/ counter_cache.rb activerecord/
lib/ active_record/ database_configurations.rb activerecord/
lib/ active_record/ database_configurations/ connection_url_resolver.rb activerecord/
lib/ active_record/ database_configurations/ database_config.rb activerecord/
lib/ active_record/ database_configurations/ hash_config.rb activerecord/
lib/ active_record/ database_configurations/ url_config.rb activerecord/
lib/ active_record/ delegated_type.rb activerecord/
lib/ active_record/ deprecator.rb activerecord/
lib/ active_record/ destroy_association_async_job.rb activerecord/
lib/ active_record/ disable_joins_association_relation.rb activerecord/
lib/ active_record/ dynamic_matchers.rb activerecord/
lib/ active_record/ encryption.rb activerecord/
lib/ active_record/ encryption/ auto_filtered_parameters.rb activerecord/
lib/ active_record/ encryption/ cipher.rb activerecord/
lib/ active_record/ encryption/ cipher/ aes256_gcm.rb activerecord/
lib/ active_record/ encryption/ config.rb activerecord/
lib/ active_record/ encryption/ configurable.rb activerecord/
lib/ active_record/ encryption/ context.rb activerecord/
lib/ active_record/ encryption/ contexts.rb activerecord/
lib/ active_record/ encryption/ derived_secret_key_provider.rb activerecord/
lib/ active_record/ encryption/ deterministic_key_provider.rb activerecord/
lib/ active_record/ encryption/ encryptable_record.rb activerecord/
lib/ active_record/ encryption/ encrypted_attribute_type.rb activerecord/
lib/ active_record/ encryption/ encrypted_fixtures.rb activerecord/
lib/ active_record/ encryption/ encrypting_only_encryptor.rb activerecord/
lib/ active_record/ encryption/ encryptor.rb activerecord/
lib/ active_record/ encryption/ envelope_encryption_key_provider.rb activerecord/
lib/ active_record/ encryption/ errors.rb activerecord/
lib/ active_record/ encryption/ extended_deterministic_queries.rb activerecord/
lib/ active_record/ encryption/ extended_deterministic_uniqueness_validator.rb activerecord/
lib/ active_record/ encryption/ key.rb activerecord/
lib/ active_record/ encryption/ key_generator.rb activerecord/
lib/ active_record/ encryption/ key_provider.rb activerecord/
lib/ active_record/ encryption/ message.rb activerecord/
lib/ active_record/ encryption/ message_serializer.rb activerecord/
lib/ active_record/ encryption/ null_encryptor.rb activerecord/
lib/ active_record/ encryption/ properties.rb activerecord/
lib/ active_record/ encryption/ read_only_null_encryptor.rb activerecord/
lib/ active_record/ encryption/ scheme.rb activerecord/
lib/ active_record/ enum.rb activerecord/
lib/ active_record/ errors.rb activerecord/
lib/ active_record/ explain.rb activerecord/
lib/ active_record/ explain_registry.rb activerecord/
lib/ active_record/ explain_subscriber.rb activerecord/
lib/ active_record/ fixture_set/ file.rb activerecord/
lib/ active_record/ fixture_set/ model_metadata.rb activerecord/
lib/ active_record/ fixture_set/ render_context.rb activerecord/
lib/ active_record/ fixture_set/ table_row.rb activerecord/
lib/ active_record/ fixture_set/ table_rows.rb activerecord/
lib/ active_record/ fixtures.rb activerecord/
lib/ active_record/ future_result.rb activerecord/
lib/ active_record/ gem_version.rb activerecord/
lib/ active_record/ inheritance.rb activerecord/
lib/ active_record/ insert_all.rb activerecord/
lib/ active_record/ integration.rb activerecord/
lib/ active_record/ internal_metadata.rb activerecord/
lib/ active_record/ legacy_yaml_adapter.rb activerecord/
lib/ active_record/ locking/ optimistic.rb activerecord/
lib/ active_record/ locking/ pessimistic.rb activerecord/
lib/ active_record/ log_subscriber.rb activerecord/
lib/ active_record/ marshalling.rb activerecord/
lib/ active_record/ message_pack.rb activerecord/
lib/ active_record/ middleware/ database_selector.rb activerecord/
lib/ active_record/ middleware/ database_selector/ resolver.rb activerecord/
lib/ active_record/ middleware/ database_selector/ resolver/ session.rb activerecord/
lib/ active_record/ middleware/ shard_selector.rb activerecord/
lib/ active_record/ migration.rb activerecord/
lib/ active_record/ migration/ command_recorder.rb activerecord/
lib/ active_record/ migration/ compatibility.rb activerecord/
lib/ active_record/ migration/ default_strategy.rb activerecord/
lib/ active_record/ migration/ execution_strategy.rb activerecord/
lib/ active_record/ migration/ join_table.rb activerecord/
lib/ active_record/ migration/ pending_migration_connection.rb activerecord/
lib/ active_record/ model_schema.rb activerecord/
lib/ active_record/ nested_attributes.rb activerecord/
lib/ active_record/ no_touching.rb activerecord/
lib/ active_record/ normalization.rb activerecord/
lib/ active_record/ persistence.rb activerecord/
lib/ active_record/ promise.rb activerecord/
lib/ active_record/ query_cache.rb activerecord/
lib/ active_record/ query_logs.rb activerecord/
lib/ active_record/ query_logs_formatter.rb activerecord/
lib/ active_record/ querying.rb activerecord/
lib/ active_record/ railtie.rb activerecord/
lib/ active_record/ railties/ controller_runtime.rb activerecord/
lib/ active_record/ railties/ job_runtime.rb activerecord/
lib/ active_record/ readonly_attributes.rb activerecord/
lib/ active_record/ reflection.rb activerecord/
lib/ active_record/ relation.rb activerecord/
lib/ active_record/ relation/ batches.rb activerecord/
lib/ active_record/ relation/ batches/ batch_enumerator.rb activerecord/
lib/ active_record/ relation/ calculations.rb activerecord/
lib/ active_record/ relation/ delegation.rb activerecord/
lib/ active_record/ relation/ finder_methods.rb activerecord/
lib/ active_record/ relation/ from_clause.rb activerecord/
lib/ active_record/ relation/ merger.rb activerecord/
lib/ active_record/ relation/ predicate_builder.rb activerecord/
lib/ active_record/ relation/ predicate_builder/ array_handler.rb activerecord/
lib/ active_record/ relation/ predicate_builder/ association_query_value.rb activerecord/
lib/ active_record/ relation/ predicate_builder/ basic_object_handler.rb activerecord/
lib/ active_record/ relation/ predicate_builder/ polymorphic_array_value.rb activerecord/
lib/ active_record/ relation/ predicate_builder/ range_handler.rb activerecord/
lib/ active_record/ relation/ predicate_builder/ relation_handler.rb activerecord/
lib/ active_record/ relation/ query_attribute.rb activerecord/
lib/ active_record/ relation/ query_methods.rb activerecord/
lib/ active_record/ relation/ record_fetch_warning.rb activerecord/
lib/ active_record/ relation/ spawn_methods.rb activerecord/
lib/ active_record/ relation/ where_clause.rb activerecord/
lib/ active_record/ result.rb activerecord/
lib/ active_record/ runtime_registry.rb activerecord/
lib/ active_record/ sanitization.rb activerecord/
lib/ active_record/ schema.rb activerecord/
lib/ active_record/ schema_dumper.rb activerecord/
lib/ active_record/ schema_migration.rb activerecord/
lib/ active_record/ scoping.rb activerecord/
lib/ active_record/ scoping/ default.rb activerecord/
lib/ active_record/ scoping/ named.rb activerecord/
lib/ active_record/ secure_password.rb activerecord/
lib/ active_record/ secure_token.rb activerecord/
lib/ active_record/ serialization.rb activerecord/
lib/ active_record/ signed_id.rb activerecord/
lib/ active_record/ statement_cache.rb activerecord/
lib/ active_record/ store.rb activerecord/
lib/ active_record/ suppressor.rb activerecord/
lib/ active_record/ table_metadata.rb activerecord/
lib/ active_record/ tasks/ database_tasks.rb activerecord/
lib/ active_record/ tasks/ mysql_database_tasks.rb activerecord/
lib/ active_record/ tasks/ postgresql_database_tasks.rb activerecord/
lib/ active_record/ tasks/ sqlite_database_tasks.rb activerecord/
lib/ active_record/ test_databases.rb activerecord/
lib/ active_record/ test_fixtures.rb activerecord/
lib/ active_record/ testing/ query_assertions.rb activerecord/
lib/ active_record/ timestamp.rb activerecord/
lib/ active_record/ token_for.rb activerecord/
lib/ active_record/ touch_later.rb activerecord/
lib/ active_record/ transactions.rb activerecord/
lib/ active_record/ translation.rb activerecord/
lib/ active_record/ type.rb activerecord/
lib/ active_record/ type/ adapter_specific_registry.rb activerecord/
lib/ active_record/ type/ date.rb activerecord/
lib/ active_record/ type/ date_time.rb activerecord/
lib/ active_record/ type/ decimal_without_scale.rb activerecord/
lib/ active_record/ type/ hash_lookup_type_map.rb activerecord/
lib/ active_record/ type/ internal/ timezone.rb activerecord/
lib/ active_record/ type/ json.rb activerecord/
lib/ active_record/ type/ serialized.rb activerecord/
lib/ active_record/ type/ text.rb activerecord/
lib/ active_record/ type/ time.rb activerecord/
lib/ active_record/ type/ type_map.rb activerecord/
lib/ active_record/ type/ unsigned_integer.rb activerecord/
lib/ active_record/ type_caster.rb activerecord/
lib/ active_record/ type_caster/ connection.rb activerecord/
lib/ active_record/ type_caster/ map.rb activerecord/
lib/ active_record/ validations.rb activerecord/
lib/ active_record/ validations/ absence.rb activerecord/
lib/ active_record/ validations/ associated.rb activerecord/
lib/ active_record/ validations/ length.rb activerecord/
lib/ active_record/ validations/ numericality.rb activerecord/
lib/ active_record/ validations/ presence.rb activerecord/
lib/ active_record/ validations/ uniqueness.rb activerecord/
lib/ active_record/ version.rb