Changelog History
Page 2
-
v6.0.2.rc2 Changes
December 09, 2019π Active Support
π Eager load translations during initialization.
Diego Plentz
π Use per-thread CPU time clock on
ActiveSupport::Notifications
.George Claghorn
Active Model
- No changes.
Active Record
Share the same connection pool for primary and replica databases in the
β transactional tests for the same database.Edouard Chin
π Fix the preloader when one record is fetched using
after_initialize
but not the entire collection.Bradley Price
π Fix collection callbacks not terminating when
:abort
is thrown.Edouard Chin, Ryuta Kamizono
π Correctly deprecate
where.not
working as NOR for relations.π 12a9664 deprecated where.not working as NOR, however
doing a relation query likewhere.not(relation: { ... })
π wouldn't be properly deprecated andwhere.not
would work as
NAND instead.Edouard Chin
π Fix
db:migrate
task with multiple databases to restore the connection
to the previous database.The migrate task iterates and establish a connection over each db
resulting in the last one to be used by subsequent rake tasks.
We should reestablish a connection to the connection that was
established before the migrate tasks was runEdouard Chin
π Fix multi-threaded issue for
AcceptanceValidator
.Ryuta Kamizono
Action View
- No changes.
Action Pack
π Allow using mountable engine route helpers in System Tests.
Chalo Fernandez
π· Active Job
π Allow Sidekiq access to the underlying job class.
π· By having access to the Active Job class, Sidekiq can get access to any
sidekiq_options
which
π· have been set on that Active Job type and serialize those options into Redis.https://github.com/mperham/sidekiq/blob/master/Changes.md#60
Mike Perham
Action Mailer
π Fix ActionMailer assertions don't work for parameterized mail with legacy delivery job.
bogdanvlviv
Action Cable
- No changes.
Active Storage
- No changes.
Action Mailbox
- No changes.
Action Text
- No changes.
Railties
π Fix the collision check for the scaffold generator.
Ryan Robeson
-
v6.0.2.rc1 Changes
November 27, 2019π Active Support
π Eager load translations during initialization.
Diego Plentz
π Use per-thread CPU time clock on
ActiveSupport::Notifications
.George Claghorn
Active Model
- No changes.
Active Record
Share the same connection pool for primary and replica databases in the
β transactional tests for the same database.Edouard Chin
π Fix the preloader when one record is fetched using
after_initialize
but not the entire colection.Bradley Price
π Fix collection callbacks not terminating when
:abort
is thrown.Edouard Chin, Ryuta Kamizono
π Correctly deprecate
where.not
working as NOR for relations.π 12a9664 deprecated where.not working as NOR, however
doing a relation query likewhere.not(relation: { ... })
π wouldn't be properly deprecated andwhere.not
would work as
NAND instead.Edouard Chin
π Fix
db:migrate
task with multiple databases to restore the connection
to the previous database.The migrate task iterates and establish a connection over each db
resulting in the last one to be used by subsequent rake tasks.
We should reestablish a connection to the connection that was
established before the migrate tasks was runEdouard Chin
π Fix multi-threaded issue for
AcceptanceValidator
.Ryuta Kamizono
Action View
- No changes.
Action Pack
π Allow using mountable engine route helpers in System Tests.
Chalo Fernandez
π· Active Job
π Allow Sidekiq access to the underlying job class.
π· By having access to the Active Job class, Sidekiq can get access to any
sidekiq_options
which
π· have been set on that Active Job type and serialize those options into Redis.https://github.com/mperham/sidekiq/blob/master/Changes.md#60
Mike Perham
Action Mailer
π Fix ActionMailer assertions don't work for parameterized mail with legacy delivery job.
bogdanvlviv
Action Cable
- No changes.
Active Storage
- No changes.
Action Mailbox
- No changes.
Action Text
- No changes.
Railties
π Fix the collision check for the scaffold generator.
Ryan Robeson
π§ Configuration files for environments (
config/environments/*.rb
) are
now able to modifyautoload_paths
,autoload_once_paths
, and
eager_load_paths
.Allen Hsu & Xavier Noria
-
v6.0.2.2 Changes
March 24, 2020π Active Support
- No changes.
Active Model
- No changes.
Active Record
- No changes.
Action View
π Fix possible XSS vector in escape_javascript helper
Aaron Patterson
Action Pack
- No changes.
π· Active Job
- No changes.
Action Mailer
- No changes.
Action Cable
- No changes.
Active Storage
- No changes.
Action Mailbox
- No changes.
Action Text
- No changes.
Railties
- No changes.
-
v6.0.2.1 Changes
December 18, 2019π Active Support
- No changes.
Active Model
- No changes.
Active Record
- No changes.
Action View
- No changes.
Action Pack
π Fix possible information leak / session hijacking vulnerability.
The
ActionDispatch::Session::MemcacheStore
is still vulnerable given it requires the
β‘οΈ gem dalli to be updated as well.π· Active Job
- No changes.
Action Mailer
- No changes.
Action Cable
- No changes.
Active Storage
- No changes.
Action Mailbox
- No changes.
Action Text
- No changes.
Railties
- No changes.
-
v6.0.1 Changes
November 05, 2019π Active Support
π
ActiveSupport::SafeBuffer
supportsEnumerator
methods.Shugo Maeda
The Redis cache store fails gracefully when the server returns a "max number of clients reached" error.
Brandon Medenwald
π Fixed that mutating a value returned by a memory cache store would unexpectedly change the cached value.
Jonathan Hyman
0οΈβ£ The default inflectors in
zeitwerk
mode support overrides:# config/initializers/zeitwerk.rbRails.autoloaders.each do |autoloader| autoloader.inflector.inflect( "html\_parser" =\> "HTMLParser", "ssl\_error" =\> "SSLError" )end
π That way, you can tweak how individual basenames are inflected without touching Active Support inflection rules, which are global. These inflectors fallback to
String#camelize
, so existing inflection rules are still taken into account for non-overridden basenames.Please, check the autoloading guide for
zeitwerk
mode if you prefer not to depend onString#camelize
at all.Xavier Noria
π Improve
Range#===
,Range#include?
, andRange#cover?
to work with beginless (startless) and endless range targets.Allen Hsu, Andrew Hodgkinson
Don't use
Process#clock_gettime(CLOCK_PROCESS_CPUTIME_ID)
on SolarisIain Beeston
Active Model
- No changes.
Active Record
Common Table Expressions are allowed on read-only connections.
Chris Morris
π New record instantiation respects
unscope
.Ryuta Kamizono
Fixed a case where
find_in_batches
could halt too early.Takayuki Nakata
Autosaved associations always perform validations when a custom validation context is used.
Tekin Suleyman
π°
sql.active_record
notifications now include the:connection
in their payloads.Eugene Kenny
βͺ A rollback encountered in an
after_commit
callback does not reset previously-committed record state.Ryuta Kamizono
π Fixed that join order was lost when eager-loading.
Ryuta Kamizono
DESCRIBE
queries are allowed on read-only connections.Dylan Thacker-Smith
π Fixed that records that had been
inspect
ed could not be marshaled.Eugene Kenny
π The connection pool reaper thread is respawned in forked processes. This fixes that idle connections in forked processes wouldn't be reaped.
John Hawthorn
The memoized result of
ActiveRecord::Relation#take
is properly cleared whenActiveRecord::Relation#reset
orActiveRecord::Relation#reload
is called.Anmol Arora
π Fixed the performance regression for
primary_keys
introduced MySQL 8.0.Hiroyuki Ishii
insert
,insert_all
,upsert
, andupsert_all
now clear the query cache.Eugene Kenny
Call
while_preventing_writes
directly fromconnected_to
.In some cases application authors want to use the database switching middleware and make explicit calls with
connected_to
. It's possible for an app to turn off writes and not turn them back on by the time we callconnected_to(role: :writing)
.This change allows apps to fix this by assuming if a role is writing we want to allow writes, except in the case it's explicitly turned off.
Eileen M. Uchitelle
π Improve detection of ActiveRecord::StatementTimeout with mysql2 adapter in the edge case when the query is terminated during filesort.
Kir Shatrov
Action View
UJS avoids
Element.closest()
for IE 9 compatibility.George Claghorn
Action Pack
β
ActionDispatch::SystemTestCase
now inherits fromActiveSupport::TestCase
rather thanActionDispatch::IntegrationTest
. This permits running jobs in system tests.George Claghorn, Edouard Chin
Registered MIME types may contain extra flags:
Mime::Type.register "text/html; fragment", :html\_fragment
Aaron Patterson
π· Active Job
- No changes.
Action Mailer
- No changes.
Action Cable
- No changes.
Active Storage
π·
ActiveStorage::AnalyzeJob
s are discarded onActiveRecord::RecordNotFound
errors.George Claghorn
π Blobs are recorded in the database before being uploaded to the service. This fixes that generated blob keys could silently collide, leading to data loss.
Julik Tarkhanov
Action Mailbox
- No changes.
Action Text
- No changes.
Railties
The
zeitwerk:check
Rake task reports files outside the app's root directory, as in engines loaded from gems.Xavier Noria
π Fixed a possible error when using the evented file update checker.
Yuji Yaginuma
β The sqlite3 database files created by the parallel testing feature are included in the default
.gitignore
file for newly-generated apps.Yasuo Honda
π
rails new
generates a.keep
file intmp/pids
. This fixes starting a server viarackup
instead ofrails server
.Rafael Mendonça França
-
v5.2.4 Changes
November 27, 2019π 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? 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 ahas_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 thehas_many
wasnil
.π 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
andafter_add
callbacks forhas_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 byRails.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
-
v5.2.4.rc1 Changes
November 23, 2019π 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? 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 ahas_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 thehas_many
wasnil
.π 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
andafter_add
callbacks forhas_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 byRails.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
-
v5.2.4.4 Changes
September 10, 2020π Active Support
- No changes.
Active Model
- No changes.
Active Record
- No changes.
Action View
- [CVE-2020-15169] Fix potential XSS vulnerability in the
translate
/t
helper
Action Pack
- No changes.
π· Active Job
- No changes.
Action Mailer
- No changes.
Action Cable
- No changes.
Active Storage
- No changes.
Railties
- No changes.
-
v5.2.4.3 Changes
June 16, 2020π Active Support
π [CVE-2020-8165] Deprecate Marshal.load on raw cache read in RedisCacheStore
[CVE-2020-8165] Avoid Marshal.load on raw cache value in MemCacheStore
Active Model
- No changes.
Active Record
- No changes.
Action View
- [CVE-2020-8167] Check that request is same-origin prior to including CSRF token in XHRs
Action Pack
[CVE-2020-8166] HMAC raw CSRF token before masking it, so it cannot be used to reconstruct a per-form token
[CVE-2020-8164] Return self when calling #each, #each_pair, and #each_value instead of the raw @parameters hash
π· Active Job
- No changes.
Action Mailer
- No changes.
Action Cable
- No changes.
Active Storage
- [CVE-2020-8162] Include Content-Length in signature for ActiveStorage direct upload
Railties
- No changes.
-
v5.2.4.2 Changes
March 24, 2020π Active Support
- No changes.
Active Model
- No changes.
Active Record
- No changes.
Action View
π Fix possible XSS vector in
escape_javascript
helperAaron Patterson
Action Pack
- No changes.
π· Active Job
- No changes.
Action Mailer
- No changes.
Action Cable
- No changes.
Active Storage
- No changes.
Railties
- No changes.