ActiveSupport
Active Support – Utility classes and Ruby extensions from Rails
Active Support is a collection of utility classes and standard library extensions that were found useful for the Rails framework. These additions reside in this package so they can be loaded as needed in Ruby projects outside of Rails.
You can read more about the extensions in the Active Support Core Extensions guide.
Download and installation
The latest version of Active Support can be installed with RubyGems:
$ gem install activesupport
Source code can be downloaded as part of the Rails project on GitHub:
License
Active Support 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:
- C
- E
- G
- T
- U
- V
Public class methods
Source code GitHub
# File activesupport/lib/active_support.rb, line 103
def self.cache_format_version
Cache.format_version
end
Source code GitHub
# File activesupport/lib/active_support.rb, line 107
def self.cache_format_version=(value)
Cache.format_version = value
end
Source code GitHub
# File activesupport/lib/active_support.rb, line 91
def self.eager_load!
super
NumberHelper.eager_load!
end
Returns the currently loaded version of Active Support as a Gem::Version
.
Source code GitHub
# File activesupport/lib/active_support/gem_version.rb, line 5
def self.gem_version
Gem::Version.new VERSION::STRING
end
Source code GitHub
# File activesupport/lib/active_support.rb, line 111
def self.to_time_preserves_timezone
DateAndTime::Compatibility.preserve_timezone
end
Source code GitHub
# File activesupport/lib/active_support.rb, line 115
def self.to_time_preserves_timezone=(value)
unless value
ActiveSupport.deprecator.warn(
"Support for the pre-Ruby 2.4 behavior of to_time has been deprecated and will be removed in Rails 7.2."
)
end
DateAndTime::Compatibility.preserve_timezone = value
end
Source code GitHub
# File activesupport/lib/active_support.rb, line 125
def self.utc_to_local_returns_utc_offset_times
DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times
end
Source code GitHub
# File activesupport/lib/active_support.rb, line 129
def self.utc_to_local_returns_utc_offset_times=(value)
DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value
end
Returns the currently loaded version of Active Support as a Gem::Version
.
Source code GitHub
# File activesupport/lib/active_support/version.rb, line 7
def self.version
gem_version
end
-
MODULE
ActiveSupport::
ActionableError -
MODULE
ActiveSupport::
Autoload -
MODULE
ActiveSupport::
Benchmarkable -
MODULE
ActiveSupport::
Cache -
MODULE
ActiveSupport::
Callbacks -
MODULE
ActiveSupport::
CompareWithRange -
MODULE
ActiveSupport::
Concern -
MODULE
ActiveSupport::
Concurrency -
MODULE
ActiveSupport::
Configurable -
MODULE
ActiveSupport::
CoreExt -
MODULE
ActiveSupport::
Dependencies -
MODULE
ActiveSupport::
DescendantsTracker -
MODULE
ActiveSupport::
EnumerableCoreExt -
MODULE
ActiveSupport::
ForkTracker -
MODULE
ActiveSupport::
Gzip -
MODULE
ActiveSupport::
Inflector -
MODULE
ActiveSupport::
JSON -
MODULE
ActiveSupport::
LazyLoadHooks -
MODULE
ActiveSupport::
LoggerSilence -
MODULE
ActiveSupport::
MessagePack -
MODULE
ActiveSupport::
Messages -
MODULE
ActiveSupport::
Multibyte -
MODULE
ActiveSupport::
Notifications -
MODULE
ActiveSupport::
NumberHelper -
MODULE
ActiveSupport::
NumericWithFormat -
MODULE
ActiveSupport::
RangeWithFormat -
MODULE
ActiveSupport::
Rescuable -
MODULE
ActiveSupport::
SecurityUtils -
MODULE
ActiveSupport::
TaggedLogging -
MODULE
ActiveSupport::
Testing -
MODULE
ActiveSupport::
VERSION -
MODULE
ActiveSupport::
XmlMini -
MODULE
ActiveSupport::
XmlMini_LibXMLSAX -
MODULE
ActiveSupport::
XmlMini_NokogiriSAX -
CLASS
ActiveSupport::
ArrayInquirer -
CLASS
ActiveSupport::
BacktraceCleaner -
CLASS
ActiveSupport::
CachingKeyGenerator -
CLASS
ActiveSupport::
CodeGenerator -
CLASS
ActiveSupport::
ConfigurationFile -
CLASS
ActiveSupport::
CurrentAttributes -
CLASS
ActiveSupport::
Deprecation -
CLASS
ActiveSupport::
DeprecationException -
CLASS
ActiveSupport::
Duration -
CLASS
ActiveSupport::
EncryptedConfiguration -
CLASS
ActiveSupport::
EncryptedFile -
CLASS
ActiveSupport::
ErrorReporter -
CLASS
ActiveSupport::
EventedFileUpdateChecker -
CLASS
ActiveSupport::
ExecutionWrapper -
CLASS
ActiveSupport::
Executor -
CLASS
ActiveSupport::
FileUpdateChecker -
CLASS
ActiveSupport::
HashWithIndifferentAccess -
CLASS
ActiveSupport::
InheritableOptions -
CLASS
ActiveSupport::
KeyGenerator -
CLASS
ActiveSupport::
LogSubscriber -
CLASS
ActiveSupport::
Logger -
CLASS
ActiveSupport::
MessageEncryptor -
CLASS
ActiveSupport::
MessageEncryptors -
CLASS
ActiveSupport::
MessageVerifier -
CLASS
ActiveSupport::
MessageVerifiers -
CLASS
ActiveSupport::
OrderedOptions -
CLASS
ActiveSupport::
ParameterFilter -
CLASS
ActiveSupport::
ProxyObject -
CLASS
ActiveSupport::
Reloader -
CLASS
ActiveSupport::
SafeBuffer -
CLASS
ActiveSupport::
SecureCompareRotator -
CLASS
ActiveSupport::
StringInquirer -
CLASS
ActiveSupport::
Subscriber -
CLASS
ActiveSupport::
TestCase -
CLASS
ActiveSupport::
TimeWithZone -
CLASS
ActiveSupport::
TimeZone -
CLASS
ActiveSupport::
XMLConverter
activesupport/
lib/ active_support.rb activesupport/
lib/ active_support/ actionable_error.rb activesupport/
lib/ active_support/ array_inquirer.rb activesupport/
lib/ active_support/ backtrace_cleaner.rb activesupport/
lib/ active_support/ benchmarkable.rb
192 More Less
activesupport/
lib/ active_support/ cache.rb activesupport/
lib/ active_support/ cache/ coder.rb activesupport/
lib/ active_support/ cache/ entry.rb activesupport/
lib/ active_support/ cache/ file_store.rb activesupport/
lib/ active_support/ cache/ mem_cache_store.rb activesupport/
lib/ active_support/ cache/ memory_store.rb activesupport/
lib/ active_support/ cache/ null_store.rb activesupport/
lib/ active_support/ cache/ redis_cache_store.rb activesupport/
lib/ active_support/ cache/ serializer_with_fallback.rb activesupport/
lib/ active_support/ cache/ strategy/ local_cache.rb activesupport/
lib/ active_support/ cache/ strategy/ local_cache_middleware.rb activesupport/
lib/ active_support/ callbacks.rb activesupport/
lib/ active_support/ code_generator.rb activesupport/
lib/ active_support/ concern.rb activesupport/
lib/ active_support/ concurrency/ load_interlock_aware_monitor.rb activesupport/
lib/ active_support/ concurrency/ null_lock.rb activesupport/
lib/ active_support/ concurrency/ share_lock.rb activesupport/
lib/ active_support/ configurable.rb activesupport/
lib/ active_support/ configuration_file.rb activesupport/
lib/ active_support/ core_ext/ array/ conversions.rb activesupport/
lib/ active_support/ core_ext/ array/ inquiry.rb activesupport/
lib/ active_support/ core_ext/ big_decimal/ conversions.rb activesupport/
lib/ active_support/ core_ext/ class/ subclasses.rb activesupport/
lib/ active_support/ core_ext/ date/ calculations.rb activesupport/
lib/ active_support/ core_ext/ date_and_time/ zones.rb activesupport/
lib/ active_support/ core_ext/ date_time/ conversions.rb activesupport/
lib/ active_support/ core_ext/ enumerable.rb activesupport/
lib/ active_support/ core_ext/ erb/ util.rb activesupport/
lib/ active_support/ core_ext/ hash/ conversions.rb activesupport/
lib/ active_support/ core_ext/ hash/ indifferent_access.rb activesupport/
lib/ active_support/ core_ext/ integer/ inflections.rb activesupport/
lib/ active_support/ core_ext/ integer/ time.rb activesupport/
lib/ active_support/ core_ext/ module/ deprecation.rb activesupport/
lib/ active_support/ core_ext/ module/ introspection.rb activesupport/
lib/ active_support/ core_ext/ numeric/ conversions.rb activesupport/
lib/ active_support/ core_ext/ numeric/ time.rb activesupport/
lib/ active_support/ core_ext/ object/ json.rb activesupport/
lib/ active_support/ core_ext/ object/ try.rb activesupport/
lib/ active_support/ core_ext/ object/ with_options.rb activesupport/
lib/ active_support/ core_ext/ range/ compare_range.rb activesupport/
lib/ active_support/ core_ext/ range/ conversions.rb activesupport/
lib/ active_support/ core_ext/ range/ each.rb activesupport/
lib/ active_support/ core_ext/ string/ inflections.rb activesupport/
lib/ active_support/ core_ext/ string/ inquiry.rb activesupport/
lib/ active_support/ core_ext/ string/ multibyte.rb activesupport/
lib/ active_support/ core_ext/ string/ output_safety.rb activesupport/
lib/ active_support/ core_ext/ time/ calculations.rb activesupport/
lib/ active_support/ core_ext/ time/ conversions.rb activesupport/
lib/ active_support/ core_ext/ time/ zones.rb activesupport/
lib/ active_support/ current_attributes.rb activesupport/
lib/ active_support/ current_attributes/ test_helper.rb activesupport/
lib/ active_support/ dependencies.rb activesupport/
lib/ active_support/ dependencies/ autoload.rb activesupport/
lib/ active_support/ dependencies/ interlock.rb activesupport/
lib/ active_support/ dependencies/ require_dependency.rb activesupport/
lib/ active_support/ deprecation.rb activesupport/
lib/ active_support/ deprecation/ behaviors.rb activesupport/
lib/ active_support/ deprecation/ constant_accessor.rb activesupport/
lib/ active_support/ deprecation/ deprecators.rb activesupport/
lib/ active_support/ deprecation/ disallowed.rb activesupport/
lib/ active_support/ deprecation/ instance_delegator.rb activesupport/
lib/ active_support/ deprecation/ method_wrappers.rb activesupport/
lib/ active_support/ deprecation/ proxy_wrappers.rb activesupport/
lib/ active_support/ deprecation/ reporting.rb activesupport/
lib/ active_support/ deprecator.rb activesupport/
lib/ active_support/ descendants_tracker.rb activesupport/
lib/ active_support/ digest.rb activesupport/
lib/ active_support/ duration.rb activesupport/
lib/ active_support/ duration/ iso8601_parser.rb activesupport/
lib/ active_support/ duration/ iso8601_serializer.rb activesupport/
lib/ active_support/ encrypted_configuration.rb activesupport/
lib/ active_support/ encrypted_file.rb activesupport/
lib/ active_support/ environment_inquirer.rb activesupport/
lib/ active_support/ error_reporter.rb activesupport/
lib/ active_support/ error_reporter/ test_helper.rb activesupport/
lib/ active_support/ evented_file_update_checker.rb activesupport/
lib/ active_support/ execution_context.rb activesupport/
lib/ active_support/ execution_context/ test_helper.rb activesupport/
lib/ active_support/ execution_wrapper.rb activesupport/
lib/ active_support/ executor.rb activesupport/
lib/ active_support/ executor/ test_helper.rb activesupport/
lib/ active_support/ file_update_checker.rb activesupport/
lib/ active_support/ fork_tracker.rb activesupport/
lib/ active_support/ gem_version.rb activesupport/
lib/ active_support/ gzip.rb activesupport/
lib/ active_support/ hash_with_indifferent_access.rb activesupport/
lib/ active_support/ html_safe_translation.rb activesupport/
lib/ active_support/ inflections.rb activesupport/
lib/ active_support/ inflector/ inflections.rb activesupport/
lib/ active_support/ inflector/ methods.rb activesupport/
lib/ active_support/ inflector/ transliterate.rb activesupport/
lib/ active_support/ isolated_execution_state.rb activesupport/
lib/ active_support/ json/ decoding.rb activesupport/
lib/ active_support/ json/ encoding.rb activesupport/
lib/ active_support/ key_generator.rb activesupport/
lib/ active_support/ lazy_load_hooks.rb activesupport/
lib/ active_support/ log_subscriber.rb activesupport/
lib/ active_support/ log_subscriber/ test_helper.rb activesupport/
lib/ active_support/ logger.rb activesupport/
lib/ active_support/ logger_silence.rb activesupport/
lib/ active_support/ logger_thread_safe_level.rb activesupport/
lib/ active_support/ message_encryptor.rb activesupport/
lib/ active_support/ message_encryptors.rb activesupport/
lib/ active_support/ message_pack.rb activesupport/
lib/ active_support/ message_pack/ cache_serializer.rb activesupport/
lib/ active_support/ message_pack/ extensions.rb activesupport/
lib/ active_support/ message_pack/ serializer.rb activesupport/
lib/ active_support/ message_verifier.rb activesupport/
lib/ active_support/ message_verifiers.rb activesupport/
lib/ active_support/ messages/ codec.rb activesupport/
lib/ active_support/ messages/ metadata.rb activesupport/
lib/ active_support/ messages/ rotation_configuration.rb activesupport/
lib/ active_support/ messages/ rotation_coordinator.rb activesupport/
lib/ active_support/ messages/ rotator.rb activesupport/
lib/ active_support/ messages/ serializer_with_fallback.rb activesupport/
lib/ active_support/ multibyte.rb activesupport/
lib/ active_support/ multibyte/ chars.rb activesupport/
lib/ active_support/ multibyte/ unicode.rb activesupport/
lib/ active_support/ notifications.rb activesupport/
lib/ active_support/ notifications/ fanout.rb activesupport/
lib/ active_support/ notifications/ instrumenter.rb activesupport/
lib/ active_support/ number_helper.rb activesupport/
lib/ active_support/ number_helper/ number_converter.rb activesupport/
lib/ active_support/ number_helper/ number_to_currency_converter.rb activesupport/
lib/ active_support/ number_helper/ number_to_delimited_converter.rb activesupport/
lib/ active_support/ number_helper/ number_to_human_converter.rb activesupport/
lib/ active_support/ number_helper/ number_to_human_size_converter.rb activesupport/
lib/ active_support/ number_helper/ number_to_percentage_converter.rb activesupport/
lib/ active_support/ number_helper/ number_to_phone_converter.rb activesupport/
lib/ active_support/ number_helper/ number_to_rounded_converter.rb activesupport/
lib/ active_support/ number_helper/ rounding_helper.rb activesupport/
lib/ active_support/ option_merger.rb activesupport/
lib/ active_support/ ordered_hash.rb activesupport/
lib/ active_support/ ordered_options.rb activesupport/
lib/ active_support/ parameter_filter.rb activesupport/
lib/ active_support/ proxy_object.rb activesupport/
lib/ active_support/ railtie.rb activesupport/
lib/ active_support/ reloader.rb activesupport/
lib/ active_support/ rescuable.rb activesupport/
lib/ active_support/ ruby_features.rb activesupport/
lib/ active_support/ secure_compare_rotator.rb activesupport/
lib/ active_support/ security_utils.rb activesupport/
lib/ active_support/ string_inquirer.rb activesupport/
lib/ active_support/ subscriber.rb activesupport/
lib/ active_support/ syntax_error_proxy.rb activesupport/
lib/ active_support/ tagged_logging.rb activesupport/
lib/ active_support/ test_case.rb activesupport/
lib/ active_support/ testing/ assertions.rb activesupport/
lib/ active_support/ testing/ constant_lookup.rb activesupport/
lib/ active_support/ testing/ constant_stubbing.rb activesupport/
lib/ active_support/ testing/ declarative.rb activesupport/
lib/ active_support/ testing/ deprecation.rb activesupport/
lib/ active_support/ testing/ error_reporter_assertions.rb activesupport/
lib/ active_support/ testing/ file_fixtures.rb activesupport/
lib/ active_support/ testing/ isolation.rb activesupport/
lib/ active_support/ testing/ method_call_assertions.rb activesupport/
lib/ active_support/ testing/ parallelization.rb activesupport/
lib/ active_support/ testing/ parallelization/ server.rb activesupport/
lib/ active_support/ testing/ parallelization/ worker.rb activesupport/
lib/ active_support/ testing/ parallelize_executor.rb activesupport/
lib/ active_support/ testing/ setup_and_teardown.rb activesupport/
lib/ active_support/ testing/ stream.rb activesupport/
lib/ active_support/ testing/ strict_warnings.rb activesupport/
lib/ active_support/ testing/ tagged_logging.rb activesupport/
lib/ active_support/ testing/ time_helpers.rb activesupport/
lib/ active_support/ time.rb activesupport/
lib/ active_support/ time_with_zone.rb activesupport/
lib/ active_support/ values/ time_zone.rb activesupport/
lib/ active_support/ version.rb activesupport/
lib/ active_support/ xml_mini.rb activesupport/
lib/ active_support/ xml_mini/ jdom.rb activesupport/
lib/ active_support/ xml_mini/ libxml.rb activesupport/
lib/ active_support/ xml_mini/ libxmlsax.rb activesupport/
lib/ active_support/ xml_mini/ nokogiri.rb activesupport/
lib/ active_support/ xml_mini/ nokogirisax.rb activesupport/
lib/ active_support/ xml_mini/ rexml.rb railties/
lib/ rails.rb railties/
lib/ rails/ application.rb railties/
lib/ rails/ application/ bootstrap.rb railties/
lib/ rails/ application/ configuration.rb railties/
lib/ rails/ application/ finisher.rb railties/
lib/ rails/ application/ routes_reloader.rb railties/
lib/ rails/ commands/ server/ server_command.rb railties/
lib/ rails/ deprecator.rb railties/
lib/ rails/ engine.rb railties/
lib/ rails/ generators/ rails/ credentials/ credentials_generator.rb railties/
lib/ rails/ generators/ rails/ encrypted_file/ encrypted_file_generator.rb railties/
lib/ rails/ generators/ rails/ encryption_key_file/ encryption_key_file_generator.rb railties/
lib/ rails/ generators/ rails/ master_key/ master_key_generator.rb railties/
lib/ rails/ rack/ logger.rb railties/
lib/ rails/ railtie.rb railties/
lib/ rails/ secrets.rb