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:
Namespace
Module
- ActiveSupport::ActionableError
- ActiveSupport::Autoload
- ActiveSupport::Benchmarkable
- ActiveSupport::Cache
- ActiveSupport::Callbacks
- ActiveSupport::CompareWithRange
- ActiveSupport::Concern
- ActiveSupport::Concurrency
- ActiveSupport::Configurable
- ActiveSupport::CoreExt
- ActiveSupport::Dependencies
- ActiveSupport::DescendantsTracker
- ActiveSupport::EnumerableCoreExt
- ActiveSupport::ForkTracker
- ActiveSupport::Gzip
- ActiveSupport::Inflector
- ActiveSupport::JSON
- ActiveSupport::LazyLoadHooks
- ActiveSupport::LoggerSilence
- ActiveSupport::MessagePack
- ActiveSupport::Messages
- ActiveSupport::Multibyte
- ActiveSupport::Notifications
- ActiveSupport::NumberHelper
- ActiveSupport::NumericWithFormat
- ActiveSupport::RangeWithFormat
- ActiveSupport::Rescuable
- ActiveSupport::SecurityUtils
- ActiveSupport::TaggedLogging
- ActiveSupport::Testing
- ActiveSupport::VERSION
- ActiveSupport::XmlMini
- ActiveSupport::XmlMini_LibXMLSAX
- ActiveSupport::XmlMini_NokogiriSAX
Class
- ActiveSupport::ArrayInquirer
- ActiveSupport::BacktraceCleaner
- ActiveSupport::BroadcastLogger
- ActiveSupport::CachingKeyGenerator
- ActiveSupport::CodeGenerator
- ActiveSupport::ConfigurationFile
- ActiveSupport::CurrentAttributes
- ActiveSupport::Deprecation
- ActiveSupport::DeprecationException
- ActiveSupport::Duration
- ActiveSupport::EncryptedConfiguration
- ActiveSupport::EncryptedFile
- ActiveSupport::ErrorReporter
- ActiveSupport::EventedFileUpdateChecker
- ActiveSupport::ExecutionWrapper
- ActiveSupport::Executor
- ActiveSupport::FileUpdateChecker
- ActiveSupport::HashWithIndifferentAccess
- ActiveSupport::InheritableOptions
- ActiveSupport::KeyGenerator
- ActiveSupport::LogSubscriber
- ActiveSupport::Logger
- ActiveSupport::MessageEncryptor
- ActiveSupport::MessageEncryptors
- ActiveSupport::MessageVerifier
- ActiveSupport::MessageVerifiers
- ActiveSupport::OrderedOptions
- ActiveSupport::ParameterFilter
- ActiveSupport::ProxyObject
- ActiveSupport::Reloader
- ActiveSupport::SafeBuffer
- ActiveSupport::SecureCompareRotator
- ActiveSupport::StringInquirer
- ActiveSupport::Subscriber
- ActiveSupport::TestCase
- ActiveSupport::TimeWithZone
- ActiveSupport::TimeZone
- ActiveSupport::XMLConverter
Methods
- cache_format_version
- cache_format_version=
- eager_load!
- gem_version
- to_time_preserves_timezone
- to_time_preserves_timezone=
- utc_to_local_returns_utc_offset_times
- utc_to_local_returns_utc_offset_times=
- version
Class Public methods
cache_format_version()
📝 Source code
# File activesupport/lib/active_support.rb, line 104
def self.cache_format_version
Cache.format_version
end
🔎 See on GitHub
cache_format_version=(value)
📝 Source code
# File activesupport/lib/active_support.rb, line 108
def self.cache_format_version=(value)
Cache.format_version = value
end
🔎 See on GitHub
eager_load!()
📝 Source code
# File activesupport/lib/active_support.rb, line 92
def self.eager_load!
super
NumberHelper.eager_load!
end
🔎 See on GitHub
gem_version()
Returns the currently loaded version of Active Support as a Gem::Version
.
📝 Source code
# File activesupport/lib/active_support/gem_version.rb, line 5
def self.gem_version
Gem::Version.new VERSION::STRING
end
🔎 See on GitHub
to_time_preserves_timezone()
📝 Source code
# File activesupport/lib/active_support.rb, line 112
def self.to_time_preserves_timezone
DateAndTime::Compatibility.preserve_timezone
end
🔎 See on GitHub
to_time_preserves_timezone=(value)
📝 Source code
# File activesupport/lib/active_support.rb, line 116
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
🔎 See on GitHub
utc_to_local_returns_utc_offset_times()
📝 Source code
# File activesupport/lib/active_support.rb, line 126
def self.utc_to_local_returns_utc_offset_times
DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times
end
🔎 See on GitHub
utc_to_local_returns_utc_offset_times=(value)
📝 Source code
# File activesupport/lib/active_support.rb, line 130
def self.utc_to_local_returns_utc_offset_times=(value)
DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value
end
🔎 See on GitHub
version()
Returns the currently loaded version of Active Support as a Gem::Version
.
📝 Source code
# File activesupport/lib/active_support/version.rb, line 7
def self.version
gem_version
end
🔎 See on GitHub