Hi, Wojtek here. Let’s see what changed in the Rails codebase.
Disable the Active Record query cache in the console by default
Pass –query-cache to enable it for the session.
Fix inflections to better handle overlapping acronyms
ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.acronym "USD"
inflect.acronym "USDC"
end
"USDC".underscore # => "usdc"
Skip unique index lookup for insert_all!
insert_all! uses on_duplicate: :raise which performs a plain insert without any ON CONFLICT clause. Previously, find_unique_index_for was called unconditionally, requiring a unique index even when one wasn’t needed.
This caused unnecessary failures for tables with composite primary keys where model.primary_key differs from the schema’s primary key columns.
insert_all (on_duplicate: :skip) and upsert_all (on_duplicate: :update) still require the unique index for generating the conflict target clause.
You can view the whole list of changes here.
We had 14 contributors to the Rails codebase this past week!
Until next time!
Subscribe to get these updates mailed to you.