Active Support – Rails 的实用类和 Ruby 扩展¶ ↑
Active Support 是在 Rails 框架中发现很有用的实用类和标准库扩展的集合。这些附加功能驻留在此包中,以便可以在 Rails 之外的 Ruby 项目中按需加载。
您可以在 Active Support Core Extensions 指南中阅读有关这些扩展的更多信息。
下载和安装¶ ↑
您可以使用 RubyGems 安装最新版本的 Active Support
$ gem install activesupport
源代码可以作为 Rails 项目的一部分在 GitHub 上下载。
许可证¶ ↑
Active Support 在 MIT 许可证下发布
支持¶ ↑
API 文档位于:
Ruby on Rails 项目的错误报告可在此处提交:
功能请求应在此处的 rubyonrails-core 论坛上讨论:
命名空间
- 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::ExecutionContext
- 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::BroadcastLogger
- CLASS ActiveSupport::CachingKeyGenerator
- CLASS ActiveSupport::CodeGenerator
- CLASS ActiveSupport::ConfigurationFile
- CLASS ActiveSupport::ContinuousIntegration
- CLASS ActiveSupport::CurrentAttributes
- CLASS ActiveSupport::DelegationError
- CLASS ActiveSupport::Deprecation
- CLASS ActiveSupport::DeprecationException
- CLASS ActiveSupport::Duration
- CLASS ActiveSupport::Editor
- CLASS ActiveSupport::EncryptedConfiguration
- CLASS ActiveSupport::EncryptedFile
- CLASS ActiveSupport::ErrorReporter
- CLASS ActiveSupport::EventReporter
- 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::Reloader
- CLASS ActiveSupport::SafeBuffer
- CLASS ActiveSupport::SecureCompareRotator
- CLASS ActiveSupport::StringInquirer
- CLASS ActiveSupport::StructuredEventSubscriber
- CLASS ActiveSupport::Subscriber
- CLASS ActiveSupport::TestCase
- CLASS ActiveSupport::TimeWithZone
- CLASS ActiveSupport::TimeZone
- CLASS ActiveSupport::XMLConverter
方法
- C
- E
- G
- T
- U
- V
类公共方法
cache_format_version() 链接
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 116 def self.cache_format_version Cache.format_version end
cache_format_version=(value) 链接
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 120 def self.cache_format_version=(value) Cache.format_version = value end
eager_load!() 链接
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 98 def self.eager_load! super NumberHelper.eager_load! end
gem_version() 链接
返回 Active Support 当前加载的版本,格式为 Gem::Version。
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support/gem_version.rb, line 5 def self.gem_version Gem::Version.new VERSION::STRING end
to_time_preserves_timezone() 链接
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 124 def self.to_time_preserves_timezone ActiveSupport.deprecator.warn( "`config.active_support.to_time_preserves_timezone` is deprecated and will be removed in Rails 8.2" ) @to_time_preserves_timezone end
to_time_preserves_timezone=(value) 链接
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 131 def self.to_time_preserves_timezone=(value) ActiveSupport.deprecator.warn( "`config.active_support.to_time_preserves_timezone` is deprecated and will be removed in Rails 8.2" ) @to_time_preserves_timezone = value end
utc_to_local_returns_utc_offset_times() 链接
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 139 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) 链接
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support.rb, line 143 def self.utc_to_local_returns_utc_offset_times=(value) DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value end
version() 链接
返回 Active Support 当前加载的版本,格式为 Gem::Version。
Source: 显示 | 在 GitHub 上
# File activesupport/lib/active_support/version.rb, line 7 def self.version gem_version end