Ruby on Rails v5.2.4.rc1 Release Notes

Release Date: 2019-11-23 // over 4 years ago
  • ๐Ÿ‘ 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