ActiveSupport::FileUpdateChecker
does not depend on Time.now
to prevent unnecessary reloads with time travel test helpers
Jan Grodowski
Fix ActiveSupport::BroadcastLogger
from executing a block argument for each logger (tagged, info, etc.).
Jared Armstrong
Make ActiveSupport::Logger
#freeze
-friendly.
Joshua Young
Fix ActiveSupport::HashWithIndifferentAccess#transform_keys!
removing defaults.
Hartley McGuire
Fix ActiveSupport::HashWithIndifferentAccess#tranform_keys!
to handle collisions.
If the transformation would result in a key equal to another not yet transformed one,
it would result in keys being lost.
Before:
>> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
=> {"c" => 1}
After:
>> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
=> {"c" => 1, "d" => 2}
Jason T Johnson, Jean Boussier
Fix ActiveSupport::Cache::MemCacheStore#read_multi
to handle network errors.
This method specifically wasn't handling network errors like other codepaths.
Alessandro Dal Grande
Fix configuring RedisCacheStore
with raw: true
.
fatkodima
Fix Enumerable#sole
for infinite collections.
fatkodima
Fix query cache for pinned connections in multi threaded transactional tests
When a pinned connection is used across separate threads, they now use a separate cache store
for each thread.
This improve accuracy of system tests, and any test using multiple threads.
Heinrich Lee Yu, Jean Boussier
Don't add id_value
attribute alias when attribute/column with that name already exists.
Rob Lewis
Fix false positive change detection involving STI and polymorphic has one relationships.
Polymorphic has_one
relationships would always be considered changed when defined in a STI child
class, causing nedless extra autosaves.
David Fritsch
Skip calling PG::Connection#cancel
in cancel_any_running_query
when using libpq >= 18 with pg < 1.6.0, due to incompatibility.
Rollback still runs, but may take longer.
Yasuo Honda, Lars Kanis
Fix stale association detection for polymorphic belongs_to
.
Florent Beaurain, Thomas Crambert
Fix removal of PostgreSQL version comments in structure.sql
for latest PostgreSQL versions which include \restrict
Brendan Weibrecht
Allow setting schema_format
in database configuration.
primary:
schema_format: ruby
Useful in multi-database setups to have different formats per-database.
T S Vallender
Use ntuples to populate row_count instead of count for Postgres
Jonathan Calvert
Fix #merge
with #or
or #and
and a mixture of attributes and SQL strings resulting in an incorrect query.
base = Comment.joins(:post).where(user_id: 1).where("recent = 1")
puts base.merge(base.where(draft: true).or(Post.where(archived: true))).to_sql
Before:
SELECT "comments".* FROM "comments"
INNER JOIN "posts" ON "posts"."id" = "comments"."post_id"
WHERE (recent = 1)
AND (
"comments"."user_id" = 1
AND (recent = 1)
AND "comments"."draft" = 1
OR "posts"."archived" = 1
)
After:
SELECT "comments".* FROM "comments"
INNER JOIN "posts" ON "posts"."id" = "comments"."post_id"
WHERE "comments"."user_id" = 1
AND (recent = 1)
AND (
"comments"."user_id" = 1
AND (recent = 1)
AND "comments"."draft" = 1
OR "posts"."archived" = 1
)
Joshua Young
Fix inline has_and_belongs_to_many
fixtures for tables with composite primary keys.
fatkodima
Fix migration log message for down operations.
Bernardo Barreto
Prepend extra_flags
in postgres' structure_load
When specifying structure_load_flags
with a postgres adapter, the flags
were appended to the default flags, instead of prepended.
This caused issues with flags not being taken into account by postgres.
Alice Loeser
Fix annotate
comments to propagate to update_all
/delete_all
.
fatkodima
Fix checking whether an unpersisted record is include?
d in a strictly
loaded has_and_belongs_to_many
association.
Hartley McGuire
create_or_find_by
will now correctly rollback a transaction.
When using create_or_find_by
, raising a ActiveRecord::Rollback error
in a after_save
callback had no effect, the transaction was committed
and a record created.
Edouard Chin
Gracefully handle Timeout.timeout
firing during connection configuration.
Use of Timeout.timeout
could result in improperly initialized database connection.
This could lead to a partially configured connection being used, resulting in various exceptions,
the most common being with the PostgreSQLAdapter raising undefined method 'key?' for nil
or TypeError: wrong argument type nil (expected PG::TypeMap)
.
Jean Boussier
Fix stale state for composite foreign keys in belongs_to associations.
Varun Sharma
URL helpers for engines mounted at the application root handle SCRIPT_NAME
correctly.
Fixed an issue where SCRIPT_NAME
is not applied to paths generated for routes in an engine
mounted at "/".
Mike Dalessio
Fix Rails.application.reload_routes!
from clearing almost all routes.
When calling Rails.application.reload_routes!
inside a middleware of
a Rake task, it was possible under certain conditions that all routes would be cleared.
If ran inside a middleware, this would result in getting a 404 on most page you visit.
This issue was only happening in development.
Edouard Chin
Address rack 3.2
deprecations warnings.
warning: Status code :unprocessable_entity is deprecated and will be removed in a future version of Rack.
Please use :unprocessable_content instead.
Rails API will transparently convert one into the other for the foreseeable future.
Earlopain, Jean Boussier
Support hash-source in Content Security Policy.
madogiwa
Always return empty body for HEAD requests in PublicExceptions
and
DebugExceptions
.
This is required by Rack::Lint
(per RFC9110).
Hartley McGuire