Module: ActiveRecord

Extended by:
ActiveSupport::Autoload
Defined in:
lib/active_record/base.rb,
lib/active_record.rb,
lib/active_record/core.rb,
lib/active_record/enum.rb,
lib/active_record/store.rb,
lib/active_record/errors.rb,
lib/active_record/result.rb,
lib/active_record/schema.rb,
lib/active_record/explain.rb,
lib/active_record/railtie.rb,
lib/active_record/scoping.rb,
lib/active_record/version.rb,
lib/active_record/fixtures.rb,
lib/active_record/fixtures.rb,
lib/active_record/querying.rb,
lib/active_record/relation.rb,
lib/active_record/callbacks.rb,
lib/active_record/migration.rb,
lib/active_record/timestamp.rb,
lib/active_record/reflection.rb,
lib/active_record/coders/json.rb,
lib/active_record/gem_version.rb,
lib/active_record/inheritance.rb,
lib/active_record/integration.rb,
lib/active_record/no_touching.rb,
lib/active_record/persistence.rb,
lib/active_record/query_cache.rb,
lib/active_record/translation.rb,
lib/active_record/validations.rb,
lib/active_record/aggregations.rb,
lib/active_record/associations.rb,
lib/active_record/model_schema.rb,
lib/active_record/sanitization.rb,
lib/active_record/transactions.rb,
lib/active_record/counter_cache.rb,
lib/active_record/null_relation.rb,
lib/active_record/schema_dumper.rb,
lib/active_record/scoping/named.rb,
lib/active_record/serialization.rb,
lib/active_record/log_subscriber.rb,
lib/active_record/relation/merger.rb,
lib/active_record/scoping/default.rb,
lib/active_record/statement_cache.rb,
lib/active_record/dynamic_matchers.rb,
lib/active_record/explain_registry.rb,
lib/active_record/fixture_set/file.rb,
lib/active_record/relation/batches.rb,
lib/active_record/runtime_registry.rb,
lib/active_record/schema_migration.rb,
lib/rails/generators/active_record.rb,
lib/active_record/attribute_methods.rb,
lib/active_record/nested_attributes.rb,
lib/active_record/coders/yaml_column.rb,
lib/active_record/explain_subscriber.rb,
lib/active_record/locking/optimistic.rb,
lib/active_record/connection_handling.rb,
lib/active_record/locking/pessimistic.rb,
lib/active_record/readonly_attributes.rb,
lib/active_record/relation/delegation.rb,
lib/active_record/association_relation.rb,
lib/active_record/attribute_assignment.rb,
lib/active_record/autosave_association.rb,
lib/active_record/migration/join_table.rb,
lib/active_record/tasks/database_tasks.rb,
lib/active_record/validations/presence.rb,
lib/active_record/relation/calculations.rb,
lib/active_record/associations/preloader.rb,
lib/active_record/attribute_methods/read.rb,
lib/active_record/relation/query_methods.rb,
lib/active_record/relation/spawn_methods.rb,
lib/active_record/validations/associated.rb,
lib/active_record/validations/uniqueness.rb,
lib/active_record/attribute_methods/dirty.rb,
lib/active_record/attribute_methods/query.rb,
lib/active_record/attribute_methods/write.rb,
lib/active_record/relation/finder_methods.rb,
lib/active_record/associations/association.rb,
lib/active_record/associations/alias_tracker.rb,
lib/active_record/connection_adapters/column.rb,
lib/active_record/migration/command_recorder.rb,
lib/active_record/relation/predicate_builder.rb,
lib/active_record/serializers/xml_serializer.rb,
lib/active_record/tasks/mysql_database_tasks.rb,
lib/rails/generators/active_record/migration.rb,
lib/active_record/railties/controller_runtime.rb,
lib/active_record/tasks/sqlite_database_tasks.rb,
lib/active_record/associations/join_dependency.rb,
lib/active_record/associations/collection_proxy.rb,
lib/active_record/attribute_methods/primary_key.rb,
lib/active_record/associations/association_scope.rb,
lib/active_record/associations/preloader/has_one.rb,
lib/active_record/associations/preloader/has_many.rb,
lib/active_record/attribute_methods/serialization.rb,
lib/active_record/tasks/postgresql_database_tasks.rb,
lib/active_record/associations/has_one_association.rb,
lib/active_record/associations/through_association.rb,
lib/active_record/connection_adapters/schema_cache.rb,
lib/active_record/associations/has_many_association.rb,
lib/active_record/associations/preloader/belongs_to.rb,
lib/active_record/associations/singular_association.rb,
lib/active_record/connection_adapters/mysql_adapter.rb,
lib/active_record/associations/preloader/association.rb,
lib/active_record/attribute_methods/before_type_cast.rb,
lib/active_record/connection_adapters/mysql2_adapter.rb,
lib/active_record/connection_adapters/postgresql/oid.rb,
lib/active_record/connection_adapters/statement_pool.rb,
lib/active_record/associations/belongs_to_association.rb,
lib/active_record/associations/collection_association.rb,
lib/active_record/connection_adapters/postgresql/cast.rb,
lib/active_record/connection_adapters/sqlite3_adapter.rb,
lib/active_record/connection_adapters/abstract/quoting.rb,
lib/active_record/connection_adapters/abstract_adapter.rb,
lib/active_record/associations/join_dependency/join_base.rb,
lib/active_record/associations/join_dependency/join_part.rb,
lib/active_record/associations/preloader/has_one_through.rb,
lib/active_record/attribute_methods/time_zone_conversion.rb,
lib/active_record/connection_adapters/postgresql/quoting.rb,
lib/active_record/connection_adapters/postgresql_adapter.rb,
lib/rails/generators/active_record/model/model_generator.rb,
lib/active_record/associations/preloader/has_many_through.rb,
lib/active_record/connection_adapters/abstract/savepoints.rb,
lib/active_record/associations/has_one_through_association.rb,
lib/active_record/connection_adapters/abstract/query_cache.rb,
lib/active_record/connection_adapters/abstract/transaction.rb,
lib/active_record/relation/predicate_builder/array_handler.rb,
lib/active_record/associations/has_many_through_association.rb,
lib/active_record/associations/preloader/through_association.rb,
lib/active_record/connection_adapters/abstract/schema_dumper.rb,
lib/active_record/connection_adapters/abstract_mysql_adapter.rb,
lib/active_record/associations/preloader/singular_association.rb,
lib/active_record/connection_adapters/postgresql/array_parser.rb,
lib/active_record/relation/predicate_builder/relation_handler.rb,
lib/active_record/connection_adapters/abstract/connection_pool.rb,
lib/active_record/connection_adapters/abstract/database_limits.rb,
lib/active_record/connection_adapters/abstract/schema_creation.rb,
lib/active_record/connection_adapters/connection_specification.rb,
lib/active_record/associations/join_dependency/join_association.rb,
lib/active_record/associations/preloader/collection_association.rb,
lib/active_record/connection_adapters/abstract/schema_statements.rb,
lib/rails/generators/active_record/migration/migration_generator.rb,
lib/active_record/associations/belongs_to_polymorphic_association.rb,
lib/active_record/connection_adapters/abstract/schema_definitions.rb,
lib/active_record/connection_adapters/abstract/database_statements.rb,
lib/active_record/connection_adapters/postgresql/schema_statements.rb,
lib/active_record/connection_adapters/postgresql/database_statements.rb,
lib/active_record/connection_adapters/postgresql/referential_integrity.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Aggregations, Associations, AttributeAssignment, AttributeMethods, AutosaveAssociation, Batches, Calculations, Callbacks, Coders, ConnectionAdapters, ConnectionHandling, Core, CounterCache, Delegation, DynamicMatchers, Enum, Explain, FinderMethods, Generators, Inheritance, Integration, Locking, ModelSchema, NestedAttributes, NoTouching, NullRelation, Persistence, QueryMethods, Querying, Railties, ReadonlyAttributes, Reflection, Sanitization, Scoping, Serialization, SpawnMethods, Store, Tasks, TestFixtures, Timestamp, Transactions, Translation, VERSION, Validations Classes: ActiveRecordError, AdapterNotFound, AdapterNotSpecified, AssociationNotFoundError, AssociationRelation, AssociationTypeMismatch, AttributeAssignmentError, Base, ConfigurationError, ConnectionNotEstablished, ConnectionTimeoutError, DangerousAttributeError, DeleteRestrictionError, DuplicateMigrationNameError, DuplicateMigrationVersionError, EagerLoadPolymorphicError, ExplainRegistry, ExplainSubscriber, Fixture, FixtureClassNotFound, FixtureSet, HasManyThroughAssociationNotFoundError, HasManyThroughAssociationPointlessSourceTypeError, HasManyThroughAssociationPolymorphicSourceError, HasManyThroughAssociationPolymorphicThroughError, HasManyThroughCantAssociateNewRecords, HasManyThroughCantAssociateThroughHasOneOrManyReflection, HasManyThroughCantDissociateNewRecords, HasManyThroughNestedAssociationsAreReadonly, HasManyThroughSourceAssociationNotFoundError, HasOneThroughCantAssociateThroughCollection, IllegalMigrationNameError, ImmutableRelation, InvalidForeignKey, InverseOfAssociationNotFoundError, IrreversibleMigration, LogSubscriber, Migration, MigrationError, MigrationProxy, Migrator, MultiparameterAssignmentErrors, NoDatabaseError, NullMigration, PendingMigrationError, PredicateBuilder, PreparedStatementInvalid, QueryCache, Railtie, ReadOnlyAssociation, ReadOnlyRecord, RecordInvalid, RecordNotDestroyed, RecordNotFound, RecordNotSaved, RecordNotUnique, Relation, Result, Rollback, RuntimeRegistry, Schema, SchemaDumper, SchemaMigration, SerializationTypeMismatch, StaleObjectError, StatementCache, StatementInvalid, SubclassNotFound, TransactionIsolationError, UnknownAttributeError, UnknownMigrationVersionError, UnknownPrimaryKey, WrappedDatabaseException, XmlSerializer

Constant Summary collapse

Fixtures =

– Deprecate ‘Fixtures’ in favor of ‘FixtureSet’. ++ :nodoc:

ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveRecord::Fixtures', 'ActiveRecord::FixtureSet')

Class Method Summary collapse

Class Method Details

.eager_load!Object



155
156
157
158
159
160
161
162
# File 'lib/active_record.rb', line 155

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!
end

.gem_versionObject

Returns the version of the currently loaded ActiveRecord as a Gem::Version



3
4
5
# File 'lib/active_record/gem_version.rb', line 3

def self.gem_version
  Gem::Version.new VERSION::STRING
end

.versionObject

Returns the version of the currently loaded ActiveRecord as a Gem::Version



5
6
7
# File 'lib/active_record/version.rb', line 5

def self.version
  gem_version
end