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.
DHH: Introducing Propshaft
Propshaft, a new asset pipeline library for Rails is enabled by the same trifecta of HTTP/2, browser-run ES6, and import maps that powers Rails 7, while being dramatically simpler than the Sprockets that went before it.
Read More
Rails

Rails 7's `load_async` allows multiple Active Record queries to be executed in parallel and can be a great tool for speeding up slow requests.

Back in 2009, we invited our community to participate in the first survey about the state of hosting Ruby on Rails applications. Over the years, we've evolved this to include questions about tools, frameworks, and workflows in order to see how the environment is changing.
We begin working on a direct messaging feature. This episode covers all the preliminary work: adding users to the app, setting up a basic authentication flow via Rails has_secure_password, adding an ability to show a user’s profile. For the latter one, we use Turbo Frames and Stimulus JS sprinkles.
Ruby
Hashes are the most common data structures in Ruby and Rails apps. In this tutorial, I'll describe a simple tip that makes working with hash values less prone to errors. It also improves code readability and provides a unified way of handling data structure issues.

This post is part of a series about how ruby-syntax-tree/syntax_tree works under the hood. It’s part of an ongoing effort to spread the word about this project, document how it works, and explain some of the internals for anyone interested. This post specifically focuses on ripper, the Ruby standard library used to parse Ruby files.
Blast from the past
One common case when it seems obvious to use branches in version control is when making a large-scale change to your application. However there is an alternative to using branches: a technique called branch by abstraction.
Sandi Metz explains what object-oriented programming wants, using straightforward examples to indoctrinate you into object-oriented thinking.
Beyond Ruby
You’re driving along a road and you come across a fence blocking your way. What do you do? You could tear it down. After all, what’s the use of a fence over a road? But you would be wise to reconsider.
Some developers advocate doing test-driven development 100% of the time. Other developers think TDD is for the birds and don’t do it at all. Still other developers go in the middle and practice TDD more than 0% of the time but less than 100% of the time.
What started as lighthearted iconoclasm, poking at the bear of SOLID, has developed into something more concrete and tangible. If I do not think the SOLID principles are useful these days, then what would I replace them with? Can any set of principles hold for all software? What do we even mean by principles?
Gem of the week
Papercraft is a new Ruby gem I’ve been working on, that provides a new way to render HTML, XML and JSON using plain Ruby.