rails 7.1.3
Active Support
-
Handle nil
backtrace_locationsinActiveSupport::SyntaxErrorProxy.Eugene Kenny
-
Fix
ActiveSupport::JSON.encodeto prevent duplicate keys.If the same key exist in both String and Symbol form it could lead to the same key being emitted twice.
Manish Sharma
-
Fix
ActiveSupport::Cache::Store#read_multiwhen using a cache namespace and local cache strategy.Mark Oleson
-
Fix
Time.now/DateTime.now/Date.todayto return results in a system timezone after#travel_to.There is a bug in the current implementation of #travel_to: it remembers a timezone of its argument, and all stubbed methods start returning results in that remembered timezone. However, the expected behaviour is to return results in a system timezone.
Aleksei Chernenkov
-
Fix
:unless_existoption forMemoryStore#write(et al) when using a cache namespace.S. Brent Faulkner
-
Fix ActiveSupport::Deprecation to handle blaming generated code.
Jean Boussier, fatkodima
Active Model
- No changes.
Active Record
-
Fix Migrations with versions older than 7.1 validating options given to
add_reference.Hartley McGuire
-
Ensure
reloadsets correct owner for each association.Dmytro Savochkin
-
Fix view runtime for controllers with async queries.
fatkodima
-
Fix
load_asyncto work with query cache.fatkodima
-
Fix polymorphic
belongs_toto correctly use parent'squery_constraints.fatkodima
-
Fix
Preloaderto not generate a query for already loaded association withquery_constraints.fatkodima
-
Fix multi-database polymorphic preloading with equivalent table names.
When preloading polymorphic associations, if two models pointed to two tables with the same name but located in different databases, the preloader would only load one.
Ari Summer
-
Fix
encrypted_attribute?to take into account context properties passed toencrypts.Maxime Réty
-
Fix
find_byto work correctly in presence of composite primary keys.fatkodima
-
Fix async queries sometimes returning a raw result if they hit the query cache.
ShipPart.async_countcould return a raw integer rather than a Promise if it found the result in the query cache.fatkodima
-
Fix
Relation#transactionto not apply a default scope.The method was incorrectly setting a default scope around its block:
Post.where(published: true).transaction do Post.count # SELECT COUNT(*) FROM posts WHERE published = FALSE; endJean Boussier
-
Fix calling
async_pluckon anonerelation.Model.none.async_pluck(:id)was returning a naked value instead of a promise.Jean Boussier
-
Fix calling
load_asyncon anonerelation.Model.none.load_asyncwas returning a broken result.Lucas Mazza
-
TrilogyAdapter: ignore
hostifsocketparameter is set.This allows to configure a connection on a UNIX socket via DATABASE_URL:
DATABASE_URL=trilogy://does-not-matter/my_db_production?socket=/var/run/mysql.sockJean Boussier
-
Fix
has_secure_tokencalls the setter method on initialize.Abeid Ahmed
-
Allow using
object_idas a database column name. It was available before rails 7.1 and may be used as a part of polymorphic relationship toobjectwhereobjectcan be any other database record.Mikhail Doronin
-
Fix
rails db:create:allto not touch databases before they are created.fatkodima
Action View
-
Better handle SyntaxError in Action View.
Mario Caropreso
-
Fix
word_wrapwith empty string.Jonathan Hefner
-
Rename
ActionView::TestCase::Behavior::ContenttoActionView::TestCase::Behavior::RenderedViewContent.Make
RenderedViewContentinherit fromString. Make private API with:nodoc:.Sean Doyle
-
Fix detection of required strict locals.
Further fix
render @collectioncompatibility with strict localsJean Boussier
Action Pack
-
Fix including
Rails.application.routes.url_helpersdirectly in anActiveSupport::Concern.Jonathan Hefner
-
Fix system tests when using a Chrome binary that has been downloaded by Selenium.
Jonathan Hefner
Active Job
-
Do not trigger immediate loading of
ActiveJob::Basewhen loadingActiveJob::TestHelper.Maxime Réty
-
Preserve the serialized timezone when deserializing
ActiveSupport::TimeWithZonearguments.Joshua Young
-
Fix ActiveJob arguments serialization to correctly serialize String subclasses having custom serializers.
fatkodima
Action Mailer
- No changes.
Action Cable
- No changes.
Active Storage
-
Fix N+1 query when fetching preview images for non-image assets.
Aaron Patterson & Justin Searls
-
Fix all Active Storage database related models to respect
ActiveRecord::Base.table_name_prefixconfiguration.Chedli Bourguiba
-
Fix
ActiveStorage::Representations::ProxyControllernot returning the proper preview image variant for previewable files.Chedli Bourguiba
-
Fix
ActiveStorage::Representations::ProxyControllerto proxy untracked variants.Chedli Bourguiba
-
Fix direct upload forms when submit button contains nested elements.
Marc Köhlbrugge
-
When using the
preprocessed: trueoption, avoid enqueuing transform jobs for blobs that are not representable.Chedli Bourguiba
-
Process preview image variant when calling
ActiveStorage::Preview#processed. For example,attached_pdf.preview(:thumb).processedwill now immediately generate the full-sized preview image and the:thumbvariant of it. Previously, the:thumbvariant would not be generated until a further call to e.g.processed.url.Chedli Bourguiba and Jonathan Hefner
-
Prevent
ActiveRecord::StrictLoadingViolationErrorwhen strict loading is enabled and the variant of an Active Storage preview has already been processed (for example, by callingActiveStorage::Preview#url).Jonathan Hefner
-
Fix
preprocessed: trueoption for named variants of previewable files.Nico Wenterodt
Action Mailbox
- No changes.
Action Text
- No changes.
Railties
-
Make sure
config.after_routes_loadedhook runs on boot.Rafael Mendonça França
-
Fix
config.log_levelnot being respected when using aBroadcastLoggerÉdouard Chin
-
Fix isolated engines to take
ActiveRecord::Base.table_name_prefixinto consideration. This will allow for engine defined models, such as inside Active Storage, to respect Active Record table name prefix configuration.Chedli Bourguiba
-
The
bin/rails app:templatecommand will no longer add potentially unwanted gem platforms viabundle lock --add-platform=...commands.Jonathan Hefner