Hi, Wojtek here. Let’s see what’s new in the Rails.
We’ve been informed that General Admission tickets will be available May 13. More information is coming soon, but you can already mark your calendar!
Implement ability to skip creating parallel testing databases
With parallel testing, Rails will create a database per process. If this isn’t desirable or you would like to implement databases handling on your own, you can now turn off this default behavior.
To skip creating a database per process, you can change it via the parallelize method:
parallelize(workers: 10, parallelize_databases: false)
or via the application configuration:
config.active_support.parallelize_databases = false
Add public API for before_fork_hook in parallel testing
This can be used to run anything before the processes are forked.
parallelize_before_fork do
# perform an action before test processes are forked
end
Set default for primary keys in insert_all/upsert_all
Previously in PostgreSQL, updating and inserting new records in one upsert wasn’t possible due to null primary key values.
nil primary key values passed into insert_all and upsert_all are now implicitly set to the default insert value specified by the adapter.
Update bundled trix
Updates trix to v2.1.14 which contains a security fix.
You can view the whole list of changes here. We had 12 contributors to the Rails codebase this past week!
Until next time!
Subscribe to get these updates mailed to you.