What is Ruby doing on Rails?
Hello, you're reading Infinum Ruby Drops, bringing you the latest Ruby and Rails related news straight to your inbox every week.
How to run slow RSpec files on Github Actions with parallel jobs by doing an auto split of the spec file
Today we’d like to show how to address the problem of slow test files negatively impacting the whole build times.
Read More
Rails
The Rails 6.1 will probably be released this year, and with it comes the major changes in ActiveModel Errors. I want to explain the rationale behind the change, and how we can prepare for the upgrade.
 You can implement it on several different levels: row, schema or database.
Rails 6.1 has provided support for bulk insert with relation. We can now use:

  user.addresses.insert_all
If I had a time machine, here’s some advice I would give my past self.
  • Apply the UUID changes off-hours with a big buffer.
  • For each change, look really carefully for referencing columns.
  • Keep the numeric IDs around.
  • Expect to hit a lot of little snags along the way.
Ruby

Fullstaq Ruby is the best server-oriented configuration of Ruby distributed as easy to install and use OS packages that we use on mkdev now. But how does it compare to Ruby from Software Collections that we've used before? Here's an article from Kirill Shirinkin with some comparative metrics.

Metaprogramming is an integral part of Ruby, more so than in any other language. This article explains the hows and whys.

Beyond Ruby
Mindsets and approaches to be more effective and efficient at reviewing code.
Tests are a double-edged sword. On one hand, well-written ones catch bugs and maintain a program’s stability, but as the code base grows, a high number of tests impedes scalability because they take a long time to run and increase the likelihood of intermittently failing tests.
Blast from the past
At multiple companies, I’ve had to build relatively simple decision engines.

Look out, honey, ’cause I’m using technology
Ain’t got time to make no apology
The Stooges

Repository of the week
Integrate PostgreSQL's enum data type into ActiveRecord's schema and migrations.