Rails 是一个 Web 应用程序框架,其中包括根据模型-视图-控制器(MVC) 模式创建数据库支持的Web应用程序所需的所有内容 。了解 MVC 模式是了解 Rails 的关键。
Rails 6.1.2 正式发布,以下是其更新内容:
ActiveSupport::Cache::MemCacheStore现在为addresses参数接受一个明确nil。config.cache_store = :mem_cache_store, nil # is now equivalent to config.cache_store = :mem_cache_store # and is also equivalent to config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"] || "localhost:11211" # which is the fallback behavior of Dalli
这有助于从:dalli_store迁移。
find_by使用归属_关联的自定义主键进行修复。rails console --sandbox对多个数据库应用程序的支持。where与空数组的多态关联。ApplicationRecord防止写入的问题。ActionController::LogSubscriber传入控制器动作时会发生的错误的问题。file_fixture_path是相对路径的时候,fixture_file_upload弃用的问题。更多详情可查看:https://github.com/rails/rails/releases/tag/v6.1.2
(文/开源中国)