Module: ActiveSupport

Extended by:
Autoload, LazyLoadHooks
Defined in:
lib/active_support.rb,
lib/active_support/gzip.rb,
lib/active_support/time.rb,
lib/active_support/cache.rb,
lib/active_support/digest.rb,
lib/active_support/logger.rb,
lib/active_support/concern.rb,
lib/active_support/railtie.rb,
lib/active_support/version.rb,
lib/active_support/duration.rb,
lib/active_support/executor.rb,
lib/active_support/reloader.rb,
lib/active_support/xml_mini.rb,
lib/active_support/benchmark.rb,
lib/active_support/callbacks.rb,
lib/active_support/multibyte.rb,
lib/active_support/rescuable.rb,
lib/active_support/test_case.rb,
lib/active_support/delegation.rb,
lib/active_support/deprecator.rb,
lib/active_support/subscriber.rb,
lib/active_support/cache/coder.rb,
lib/active_support/cache/entry.rb,
lib/active_support/deprecation.rb,
lib/active_support/gem_version.rb,
lib/active_support/inflections.rb,
lib/active_support/configurable.rb,
lib/active_support/dependencies.rb,
lib/active_support/fork_tracker.rb,
lib/active_support/message_pack.rb,
lib/active_support/ordered_hash.rb,
lib/active_support/benchmarkable.rb,
lib/active_support/json/decoding.rb,
lib/active_support/json/encoding.rb,
lib/active_support/key_generator.rb,
lib/active_support/notifications.rb,
lib/active_support/number_helper.rb,
lib/active_support/option_merger.rb,
lib/active_support/xml_mini/jdom.rb,
lib/active_support/array_inquirer.rb,
lib/active_support/code_generator.rb,
lib/active_support/deep_mergeable.rb,
lib/active_support/encrypted_file.rb,
lib/active_support/error_reporter.rb,
lib/active_support/log_subscriber.rb,
lib/active_support/logger_silence.rb,
lib/active_support/messages/codec.rb,
lib/active_support/security_utils.rb,
lib/active_support/tagged_logging.rb,
lib/active_support/testing/stream.rb,
lib/active_support/time_with_zone.rb,
lib/active_support/xml_mini/rexml.rb,
lib/active_support/class_attribute.rb,
lib/active_support/lazy_load_hooks.rb,
lib/active_support/multibyte/chars.rb,
lib/active_support/ordered_options.rb,
lib/active_support/string_inquirer.rb,
lib/active_support/xml_mini/libxml.rb,
lib/active_support/actionable_error.rb,
lib/active_support/broadcast_logger.rb,
lib/active_support/cache/file_store.rb,
lib/active_support/cache/null_store.rb,
lib/active_support/message_verifier.rb,
lib/active_support/messages/rotator.rb,
lib/active_support/parameter_filter.rb,
lib/active_support/values/time_zone.rb,
lib/active_support/backtrace_cleaner.rb,
lib/active_support/core_ext/erb/util.rb,
lib/active_support/execution_context.rb,
lib/active_support/execution_wrapper.rb,
lib/active_support/inflector/methods.rb,
lib/active_support/message_encryptor.rb,
lib/active_support/message_verifiers.rb,
lib/active_support/messages/metadata.rb,
lib/active_support/multibyte/unicode.rb,
lib/active_support/testing/isolation.rb,
lib/active_support/xml_mini/nokogiri.rb,
lib/active_support/cache/memory_store.rb,
lib/active_support/configuration_file.rb,
lib/active_support/current_attributes.rb,
lib/active_support/message_encryptors.rb,
lib/active_support/syntax_error_proxy.rb,
lib/active_support/testing/assertions.rb,
lib/active_support/xml_mini/libxmlsax.rb,
lib/active_support/core_ext/enumerable.rb,
lib/active_support/core_ext/object/try.rb,
lib/active_support/core_ext/range/each.rb,
lib/active_support/descendants_tracker.rb,
lib/active_support/file_update_checker.rb,
lib/active_support/testing/declarative.rb,
lib/active_support/testing/deprecation.rb,
lib/active_support/core_ext/object/json.rb,
lib/active_support/environment_inquirer.rb,
lib/active_support/notifications/fanout.rb,
lib/active_support/testing/time_helpers.rb,
lib/active_support/xml_mini/nokogirisax.rb,
lib/active_support/cache/mem_cache_store.rb,
lib/active_support/concurrency/null_lock.rb,
lib/active_support/dependencies/autoload.rb,
lib/active_support/deprecation/behaviors.rb,
lib/active_support/deprecation/reporting.rb,
lib/active_support/html_safe_translation.rb,
lib/active_support/inflector/inflections.rb,
lib/active_support/testing/file_fixtures.rb,
lib/active_support/concurrency/share_lock.rb,
lib/active_support/dependencies/interlock.rb,
lib/active_support/deprecation/disallowed.rb,
lib/active_support/secure_compare_rotator.rb,
lib/active_support/testing/tagged_logging.rb,
lib/active_support/cache/redis_cache_store.rb,
lib/active_support/deprecation/deprecators.rb,
lib/active_support/duration/iso8601_parser.rb,
lib/active_support/encrypted_configuration.rb,
lib/active_support/inflector/transliterate.rb,
lib/active_support/message_pack/extensions.rb,
lib/active_support/message_pack/serializer.rb,
lib/active_support/testing/constant_lookup.rb,
lib/active_support/testing/parallelization.rb,
lib/active_support/testing/strict_warnings.rb,
lib/active_support/isolated_execution_state.rb,
lib/active_support/logger_thread_safe_level.rb,
lib/active_support/core_ext/hash/conversions.rb,
lib/active_support/testing/constant_stubbing.rb,
lib/active_support/cache/strategy/local_cache.rb,
lib/active_support/core_ext/range/conversions.rb,
lib/active_support/deprecation/proxy_wrappers.rb,
lib/active_support/log_subscriber/test_helper.rb,
lib/active_support/notifications/instrumenter.rb,
lib/active_support/testing/setup_and_teardown.rb,
lib/active_support/deprecation/method_wrappers.rb,
lib/active_support/duration/iso8601_serializer.rb,
lib/active_support/evented_file_update_checker.rb,
lib/active_support/core_ext/numeric/conversions.rb,
lib/active_support/core_ext/range/compare_range.rb,
lib/active_support/hash_with_indifferent_access.rb,
lib/active_support/testing/parallelize_executor.rb,
lib/active_support/core_ext/string/output_safety.rb,
lib/active_support/deprecation/constant_accessor.rb,
lib/active_support/message_pack/cache_serializer.rb,
lib/active_support/messages/rotation_coordinator.rb,
lib/active_support/number_helper/rounding_helper.rb,
lib/active_support/cache/serializer_with_fallback.rb,
lib/active_support/number_helper/number_converter.rb,
lib/active_support/testing/method_call_assertions.rb,
lib/active_support/testing/parallelization/server.rb,
lib/active_support/testing/parallelization/worker.rb,
lib/active_support/messages/rotation_configuration.rb,
lib/active_support/core_ext/big_decimal/conversions.rb,
lib/active_support/testing/tests_without_assertions.rb,
lib/active_support/messages/serializer_with_fallback.rb,
lib/active_support/testing/error_reporter_assertions.rb,
lib/active_support/cache/strategy/local_cache_middleware.rb,
lib/active_support/number_helper/number_to_human_converter.rb,
lib/active_support/number_helper/number_to_phone_converter.rb,
lib/active_support/concurrency/load_interlock_aware_monitor.rb,
lib/active_support/number_helper/number_to_rounded_converter.rb,
lib/active_support/number_helper/number_to_currency_converter.rb,
lib/active_support/number_helper/number_to_delimited_converter.rb,
lib/active_support/number_helper/number_to_human_size_converter.rb,
lib/active_support/number_helper/number_to_percentage_converter.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ActionableError, Autoload, Benchmark, Benchmarkable, BigDecimalWithDefaultFormat, Cache, Callbacks, ClassAttribute, CompareWithRange, Concern, Concurrency, Configurable, CoreExt, DeepMergeable, Delegation, Dependencies, DescendantsTracker, EachTimeWithZone, EnumerableCoreExt, ExecutionContext, ForkTracker, Gzip, HtmlSafeTranslation, Inflector, IsolatedExecutionState, JSON, LazyLoadHooks, LoggerSilence, LoggerThreadSafeLevel, MessagePack, Messages, Multibyte, Notifications, NumberHelper, NumericWithFormat, RaiseWarnings, RangeWithFormat, Rescuable, SecurityUtils, TaggedLogging, Testing, ToJsonWithActiveSupportEncoder, Tryable, VERSION, XmlMini, XmlMini_JDOM, XmlMini_LibXML, XmlMini_LibXMLSAX, XmlMini_Nokogiri, XmlMini_NokogiriSAX, XmlMini_REXML Classes: ArrayInquirer, BacktraceCleaner, BroadcastLogger, CachingKeyGenerator, CodeGenerator, ConfigurationFile, CurrentAttributes, DelegationError, Deprecation, DeprecationException, Digest, Duration, EncryptedConfiguration, EncryptedFile, EnvironmentInquirer, ErrorReporter, EventedFileUpdateChecker, ExecutionWrapper, Executor, FileUpdateChecker, HashWithIndifferentAccess, InheritableOptions, KeyGenerator, LogSubscriber, Logger, MessageEncryptor, MessageEncryptors, MessageVerifier, MessageVerifiers, OptionMerger, OrderedHash, OrderedOptions, ParameterFilter, Railtie, Reloader, SafeBuffer, SecureCompareRotator, StringInquirer, Subscriber, SyntaxErrorProxy, TestCase, TimeWithZone, TimeZone, XMLConverter

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Autoload

autoload, autoload_at, autoload_under, eager_autoload, eager_load!

Methods included from LazyLoadHooks

extended, on_load, run_load_hooks

Instance Attribute Details

#error_reporterObject

:nodoc:



104
105
106
# File 'lib/active_support.rb', line 104

def error_reporter
  @error_reporter
end

Class Method Details

.cache_format_versionObject



106
107
108
# File 'lib/active_support.rb', line 106

def self.cache_format_version
  Cache.format_version
end

.cache_format_version=(value) ⇒ Object



110
111
112
# File 'lib/active_support.rb', line 110

def self.cache_format_version=(value)
  Cache.format_version = value
end

.deprecatorObject

:nodoc:



4
5
6
# File 'lib/active_support/deprecator.rb', line 4

def self.deprecator # :nodoc:
  ActiveSupport::Deprecation._instance
end

.eager_load!Object



94
95
96
97
98
# File 'lib/active_support.rb', line 94

def self.eager_load!
  super

  NumberHelper.eager_load!
end

.gem_versionObject

Returns the currently loaded version of Active Support as a Gem::Version.



5
6
7
# File 'lib/active_support/gem_version.rb', line 5

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

.to_time_preserves_timezoneObject



114
115
116
# File 'lib/active_support.rb', line 114

def self.to_time_preserves_timezone
  DateAndTime::Compatibility.preserve_timezone
end

.to_time_preserves_timezone=(value) ⇒ Object



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/active_support.rb', line 118

def self.to_time_preserves_timezone=(value)
  if !value
    ActiveSupport.deprecator.warn(
      "`to_time` will always preserve the receiver timezone rather than system local time in Rails 8.1. " \
      "To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`."
    )
  elsif value != :zone
    ActiveSupport.deprecator.warn(
      "`to_time` will always preserve the full timezone rather than offset of the receiver in Rails 8.1. " \
      "To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`."
    )
  end

  DateAndTime::Compatibility.preserve_timezone = value
end

.utc_to_local_returns_utc_offset_timesObject



134
135
136
# File 'lib/active_support.rb', line 134

def self.utc_to_local_returns_utc_offset_times
  DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times
end

.utc_to_local_returns_utc_offset_times=(value) ⇒ Object



138
139
140
# File 'lib/active_support.rb', line 138

def self.utc_to_local_returns_utc_offset_times=(value)
  DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value
end

.versionObject

Returns the currently loaded version of Active Support as a Gem::Version.



7
8
9
# File 'lib/active_support/version.rb', line 7

def self.version
  gem_version
end