En

Ruby on Rails官网普通更新(2019-11-27)

来源:Ruby on Rails官网 发布日期:2019-11-27 阅读次数:267 评论:0

基本信息

发布日期:2019-11-27(官方当地时间)

更新类型:普通更新

更新版本:v5.2.4

感知时间:2019-12-06 15:47:25

风险等级:未知

情报贡献:TSRC

更新标题

普通更新

更新详情

## Active Support

* Make ActiveSupport::Logger Fiber-safe. Fixes #36752.

Use `Fiber.current.__id__` in `ActiveSupport::Logger#local_level=` in order
to make log level local to Ruby Fibers in addition to Threads.

Example:

logger = ActiveSupport::Logger.new(STDOUT)
logger.level = 1
p "Main is debug? #{logger.debug?}"

Fiber.new {
logger.local_level = 0
p "Thread is debug? #{logger.debug?}"
}.resume

p "Main is debug? #{logger.debug?}"

Before:

Main is debug? false
Thread is debug? true
Main is debug? true

After:

Main is debug? false
Thread is debug? true
Main is debug? false

*Alexander Varnin*



## Active Model

* Type cast falsy boolean symbols on boolean attribute as false.

Fixes #35676.

*Ryuta Kamizono*



## Active Record

* Fix circular `autosave: true` causes invalid records to be saved.

Prior to the fix, when there was a circular series of `autosave: true`
associations, the callback for a `has_many` association was run while
another instance of the same callback on the same association hadn't
finished running. When control returned to the first instance of the
callback, the instance variable had changed, and subsequent associated
records weren't saved correctly. Specifically, the ID field for the
`belongs_to` corresponding to the `has_many` was `nil`.

Fixes #28080.

*Larry Reid*

* PostgreSQL: Fix GROUP BY with ORDER BY virtual count attribute.

Fixes #36022.

*Ryuta Kamizono*

* Fix sqlite3 collation parsing when using decimal columns.

*Martin R. Schuster*

* Make ActiveRecord `ConnectionPool.connections` method thread-safe.

Fixes #36465.

*Jeff Doering*

* Assign all attributes before calling `build` to ensure the child record is visible in
`before_add` and `after_add` callbacks for `has_many :through` associations.

Fixes #33249.

*Ryan H. Kerr*



## Action View

* Allow programmatic click events to trigger Rails UJS click handlers.
Programmatic click events (eg. ones generated by `Rails.fire(link, "click")`) don't specify a button. These events were being incorrectly stopped by code meant to ignore scroll wheel and right clicks introduced in #34573.

*Sudara Williams*



## Action Pack

* No changes.



## Active Job

* No changes.



## Action Mailer

* No changes.



## Action Cable

* No changes.



## Active Storage

* No changes.



## Railties

* Use original `bundler` environment variables during the process of generating a new rails project.

*Marco Costa*

* Allow loading seeds without ActiveJob.

Fixes #35782

*Jeremy Weathers*

* Only force `:async` ActiveJob adapter to `:inline` during seeding.

*BatedUrGonnaDie*

软件描述

Ruby on Rails 是一个可以使你开发、部署、维护 web 应用程序变得简单的框架。

CVE编号

TSRC分析

暂无

业界资讯

暂无

评论

提交评论 您输入的评论有误,请重新输入