rails 5.2.4
Active Support
-
Make ActiveSupport::Logger Fiber-safe. Fixes #36752.
Use
Fiber.current.__id__inActiveSupport::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? trueAfter:
Main is debug? false Thread is debug? true Main is debug? falseAlexander Varnin
Active Model
-
Type cast falsy boolean symbols on boolean attribute as false.
Fixes #35676.
Ryuta Kamizono
Active Record
-
Fix circular
autosave: truecauses invalid records to be saved.Prior to the fix, when there was a circular series of
autosave: trueassociations, the callback for ahas_manyassociation 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 thebelongs_tocorresponding to thehas_manywasnil.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.connectionsmethod thread-safe.Fixes #36465.
Jeff Doering
-
Assign all attributes before calling
buildto ensure the child record is visible inbefore_addandafter_addcallbacks forhas_many :throughassociations.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
bundlerenvironment variables during the process of generating a new rails project.Marco Costa
-
Allow loading seeds without ActiveJob.
Fixes #35782
Jeremy Weathers
-
Only force
:asyncActiveJob adapter to:inlineduring seeding.BatedUrGonnaDie