$ the-wire · showcase
Composite foreign keys and abstract-class constraints get fixed across Rails and GlobalID
By RepoJournal · Filed · About Rails · Composed from the cited sources · methodology
Three Rails fixes land on the composite-key and abstract-class edges of Active Record, while GlobalID stops letting one malformed GID take down an entire batch.
Skip GIDs with a mismatching model_id in Locator.locate_many rails/globalid
Locator.locate_many used to raise NoMethodError when a GID's id count didn't match the model's primary key, so a single malformed GID such as gid://app/Person/1/2 broke the entire batch and surfaced as RecordUnavailable rather than RecordNotFound. The fix uses dig to skip invalid GIDs, bringing locate_many in line with locate, which already returned nil for them.
Fix query constraints on abstract classes rails/rails
Since the query_constraints_list change, reading that list loads the schema, so an abstract class with explicit query_constraints raised ActiveRecord::TableNotSpecified and broke associations declared on it, because AssociationReflection#foreign_key needs the list to derive the composite key. Concrete models with explicit query_constraints also loaded their schema just to answer foreign_key.
Fix disable_joins through associations with a composite owner foreign key rails/rails
DisableJoinsAssociationScope#last_scope_chain read the owner's key with owner.read_attribute on the first hop's join foreign key, which returns nil when that key is composite and made loading the association raise ArgumentError: Expected corresponding value for [...] to be an Array. It now reads the value through ActiveRecord::Key.for(...).value_of(owner), which walks every column of a composit...
Extract ActiveSupport::WeakSet as an internal API rails/rails
byroot extracted ActiveSupport::WeakSet as an internal API. It is plumbing for the framework rather than a public surface.