$ the-wire · showcase
Attribute-read regression fixed, decimal numericality corrected
By RepoJournal · Filed · About Rails · Composed from the cited sources · methodology
Rails walks back an overreaching internal attribute-read refactor and fixes the numericality validator on database-backed decimal columns with implicit scale, while two smaller performance and cleanup changes land quietly alongside.
Restore reads that don't expect a missing attribute to raise rails/rails
Internal attribute reads expect nil on a missing attribute, not a raised exception, and the earlier move to the new raising helpers broke that contract. matthewd restored permissive reads and reworked the Read fast path to raise the inner exception and swallow it, so internal callers regain the behavior they were written against.
Fix numericality validator on decimal attribute with implicit scale rails/rails
Since scale support landed for the numericality validator on decimal attributes, a database-backed column with implicit scale (for example a decimal(10) column) was not truncated, unlike one with an explicit scale. kamipo's fix applies the truncation in that case while leaving the non-database-backed decimal type as it was.
Consolidate the record to id conversion into the predicate builder rails/rails
excluding! used to map records to their ids before building the where clause, but ArrayHandler already performs that conversion for the single-column case, so kamipo removed the redundant pass added for composite primary keys. Less work per call on an already common query path.
Avoid pair arrays when generating error translations rails/rails
Error translation lookup no longer allocates a pair array per model ancestor before a flat_map; the keys are appended straight to the defaults array, preserving attribute and inheritance precedence. thomasklemm measured one fewer 40-byte Array per ancestor on Ruby 4.0.7 and calls it allocation-only, with no throughput gain claimed.
Merge pull request #59232 from yahonda/remove-supports-identity-and-native-partitioning rails/rails
The two capability predicates supports_identity_columns? and supports_native_partitioning? are gone from the adapter API, so any adapter or gem still calling them needs to stop.
Action items