module ActiveRecord
Constants
- MigrationProxy
-
MigrationProxy
is used to defer loading of the actual migration classes until they are needed - Point
- UnknownAttributeError
-
Raised when unknown attributes are supplied via mass assignment.
Attributes
Public Class Methods
Source
# File lib/active_record.rb, line 187 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
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
# File lib/active_record.rb, line 365 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
Calls superclass method
Source
# File lib/active_record/gem_version.rb, line 5 def self.gem_version Gem::Version.new VERSION::STRING end
Returns the currently loaded version of Active Record as a Gem::Version
.
Source
# File lib/active_record.rb, line 228 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
Set the global_executor_concurrency
. This configuration value can only be used with the global thread pool async query executor.
Source
# File lib/active_record.rb, line 248 singleton_class.attr_accessor :verbose_query_logs
Specifies if the methods calling database queries should be logged below their relevant queries. Defaults to false.
Source
# File lib/active_record/version.rb, line 7 def self.version gem_version end
Returns the currently loaded version of Active Record as a Gem::Version
.