Short Ruby Newsletter - edition 118

The one where Rails publishes so many goodies for the community and Ruby announces 3.4.0 release candidate

In partnership with

Table of Contents

A note from Lucian Ghinda - the curator of Short Ruby Newsletter:

The Short Ruby will take a winter break, so the next edition will probably be on 13 January. I will monitor posts starting on 6 January. Meanwhile, enjoy the winter vacation and start a new project with Ruby 3.4 and Rails 8

If you want to support the newsletter in 2025, you can upgrade to paid subscriber at https://subscribe.shortruby.com

(ad πŸ‘‡)

There’s a reason 400,000 professionals read this daily.

Join The AI Report, trusted by 400,000+ professionals at Google, Microsoft, and OpenAI. Get daily insights, tools, and strategies to master practical AI skills that drive results.

πŸš€ Launches and discounts

πŸ“… Events

πŸ“… Ruby Kaigi announced the CFP is open at CFPApp

Source: @rubykaigi

πŸ‘‰ All about Code and Ruby

Source: @hsbt.org

Mike Dalessio shared that rake-compiler-dock now supports 3.4.0-rc1

πŸ‘‰ Rafal Franca announced the release of Rails 8.0.1

Source: @rails

πŸ‘‰ A series of fresh things were published by Rails. See a summary on their blog post Want to learn about Rails 8? START HERE

πŸ‘ Published a case study about Doximity using Rails that I think we can use in conversations about starting a big project with Ruby on Rails:

Source: @rails

Published a new Getting Started Tutorials written by Chris Oliver:

πŸ‘ Published a series called Rails 8 Unpacked with Typecraft devs that goes through all the goodies that Rails 8 has to offer:

Source: @rails

πŸ‘ A big update published for Rails Guides:

Source: @rails

πŸ‘‰ Tim Riley wrote about State of Hanami: December 2024

πŸ‘‰ Alex Denisov, Amir Rajan published a proposal about Lightstorm: minimalistic Ruby compiler

πŸ’» Code Samples

Start learning AI in 2025

Everyone talks about AI, but no one has the time to learn it. So, we found the easiest way to learn AI in as little time as possible: The Rundown AI.

It's a free AI newsletter that keeps you up-to-date on the latest AI news, and teaches you how to apply it in just 5 minutes a day.

Plus, complete the quiz after signing up and they’ll recommend the best AI tools, guides, and courses – tailored to your needs.

οΈπŸ’» Postmodern shared about constants lookup in Ruby:

πŸ’» Yaroslav Shmarov shared a code sample about Rails OmniAuth:

πŸ’» Chris Oliver shared a code sample about frozen errors:

Source: @excid3.com

Xavier Noria shared the document he and Jean Boussier wrote about Ruby: The future of frozen string literals

οΈπŸ’» Ruby On Rails shared a code sample about using the  ActiveSupport::Testing::ConstantStubbing

Source: @rails

οΈπŸ’» Rob Zolkos shared a code sample about Rails built-in support for previewing emails in the web browser:

Source: @robzolkos

He later added:

οΈπŸ’» Ruby Cademy shared about using ! in Rails 8 migration generator to mark a column in a migration as null: false

Source: @RubyCademy

οΈπŸ’» Ross Kaffenberger shared about how Ruby treats the backslash character as a line continuation:

Source: @rossta

οΈπŸ’» Ruby Cademy shared about the new params#expect the option to handle explicit parameter handling (see ExpectedParameterMissing):

Source: @RubyCademy

οΈπŸ’» Saeloun shared a code sample about implementing passwordless authentication with WebAuthn in rails:

Source: @HiSaeloun

πŸ’» Jose Farias shared a code sample about code being context aware:

πŸ’» Ender Ahmet Yurt shared a code sample about using each_with_object instead of each with mutations:

πŸ’» Gregory Brown shared a puzzle asking where it can be the error in the shared code sample. (check the Gist here). There are answers in the replies, see for example the one from Konnor Rogers

πŸ’» Rails Designer published code samples about Simple Stripe Billing for Rails

πŸ’» Wilbert Liu shared a code sample about using Rails and Inertia:

πŸ’» Tim Fischbach shared a code sample about preloading different data based on usage:

πŸ’» Harry Llewelyn shared about Ruby on Rails offering protection for XSS, SQL Injection and CSRF:

Source: @harry.dev

οΈπŸ’» Hyukki shared a code sample showing how they use delegated type from Rails:

Source: @hyukki725

οΈπŸ’» Vitaly Slobodin shared a tip about configuring mise:

Source: @Vitalliumm

οΈπŸ’» Ross Kaffenberger shared about building Rails UI with Rails:

Source: @rossta

οΈπŸ’» Saeloun shared about Rails 8 adding the possibility to use multiple rate limits per controller:

Source: @HiSaeloun

οΈπŸ’» Matt Swanson shared a code sample about doing append body to append content to the body:

Source: @_swanson

οΈπŸ’» Ruby Cademy shared about using Rails ActiveRecord with_lock:

Source: @RubyCademy

οΈπŸ’» John Nunemaker shared about using bundler-leak:

Source: @jnunemaker

πŸ“ Thinking about Code Design

οΈπŸ“ Joel Drapper shared about replacing some status enums with saving the date they were saved:

There is an interesting discussion happening in the replies about Ruby boolean types. I am adding here some cherry picked responses, not necessary one after the other. You should read the entire thread:

Source: @ufuk.dev

Source: @ufuk.dev

Source: @ufuk.dev

Source: @ufuk.dev

It could be helpful to read (with an open mind) the discussion in this old thread (since Ruby 3.1) about returning a boolean that someone shared in one of the replies.

πŸ“ Jorge Manrubia published a new article about A vanilla Rails stack is plenty

Source: @jorgemanru

πŸ’‘Around code (news, findings, books, and more - all about Ruby)

Source: @rails

❀️ Why Choose Ruby and Rails

❀️ Gergely Orosz shared about choosing Ruby and Ruby on Rails:

Source: @inazarova

❀️ Misaki Shioi (γ—γŠγ„) shared about writing Ruby:

Source: @coe401_

❀️ Miguel Michelson shared about the ease of upgrading from Rails 7 to Rails 8:

Source: @michelson

❀️ Lucian Ghinda shared about starting new projects with Ruby 3.4 and Rails 8:

🧰 Gems, Libraries, Tools and Updates

If you are looking for some gems inspiration, on Bluesky there are people sharing one gem per day. Just open the 20DayGemChallenge and see what people are posting currently.

Gregory Brown shared some of the threads recommending gems here:

πŸ†• New Gems and Repos

🧰 Updates

🧰 Ruby Monthly Meeting happend on 12 December and the meeting log is available at https://github.com/ruby/dev-meeting-log/blob/master/2024/DevMeeting-2024-12-12.md There are a lot of things being discussed, I will include one here:

🧰 Tomoya Ishida is now a Ruby core committer after a proposal from Akira Matsuda:

🧰 Yudai Takada is now a Ruby core committer after a proposal from Kaneko Yuichiro:

🧰 Donal McBreen released Kamal v2.4.0

🧰 Bozhidar Batsov announced an update for Rubocop version 1.69.2

Source: @batsov.net

🧰 Mike Dalessio announced an update of Nokogiri v1.17.1

🧰 Maeda Go announced the release of Redmine 6.0.2 and 5.1.5:

Source: @g_maeda

🧰 Camden Narzt announced a new version for Passenger 6.0.24 (I also recommend reading the Lower latencies during deploys in new releases of Phusion Passenger article)

🧰 Yaroslav Shmarov announced an update to the moneygun gem about Organisation ownership transfer

Source: @yarotheslav

πŸ‘‰ Justin Jackson shared about stress:

More content: πŸ“š πŸ—ž 🎧 πŸŽ₯ ✍🏾

πŸ—ž Newsletters

πŸ—ž Hotwire Weekly published a new edition about Week 50 - Turbo morphing woes, 10 Hotwire Native tips, and more!

πŸ—ž Ruby Weekly published a new article about Ruby 3.4 - almost!

πŸ—ž Awesome Ruby Newsletter published a new article about πŸ’Ž Issue 447 - Keeping Rails cool: the modern Evil Martians frontend toolkit

πŸ—ž Sajjad Umar published a new edition about Ruby on Rails β€” Dec 2024

🎧 Podcasts

🎧 Remote Ruby published an article about Jason Meller on 1Password joining the Rails Foundation

🎧 The Ruby On Rails Podcast published a new article about Episode 529: Catching Up With Nick Schwaderer

πŸ“½οΈ πŸŽ₯ Videos

πŸŽ₯ Ruby Central announced that videos from Ruby Conf 2024 are live

πŸŽ₯ Joel Drapper published a video about  Ride along with Phlex and Literal

πŸŽ₯ Jp Camara published a new article about My RubyConf talk is now on YouTube!

πŸŽ₯ Yaroslav Shmarov published a new video about 180 EU eInvoicing. PDF to XML to JSON. FaxturX, ZUGFeRD

πŸŽ₯ Jason Swett published a new article about Design Flaws in the Way of Performance Improvement - Live Coding on SaturnCI

πŸŽ₯ AI on Rails published a video about Build a Rails 8 Application Using Aider AI and CSS Zero

πŸŽ₯ Drifting Ruby published a new video about Browser LLMs | Drifting Ruby

πŸŽ₯ Dave Thomas continues to publish videos solving Advent of Code with Ruby

πŸŽ₯ Tyler Tringas published a new video about Re-learning to Code with AI: 1st Rails App Live

πŸŽ₯ Vladimir Dementyev shared their video from Kaigi on Rails about Rails Way, or the highway

✍🏾 Articles

What’s new πŸ†•

Alex Denisov, Amir Rajan published an article about Lightstorm: minimalistic Ruby compiler

Tim Riley published an article about Hanami | State of Hanami, December 2024

Jorge Manrubia published a new article about 37signals Dev β€” A vanilla Rails stack is plenty

Rails Designer published a new article about Simple Stripe Billing for Rails

Jeffery Morhous published a new article about What's new in Rails 8

Irina Nazarova published an article about Keeping Rails cool: the modern frontend toolkit

Matheus Richard published an article about Turbo morphing woes

Peter Solnica published a new article about Retiring from the core teams

Rhiannon Payne published an article about RubyGems.org Completes First Security Audit With Trail of Bits

Avo published a new article about Dynamic Table of Contents with Rails and Nokogiri

Josef Strzibny published a new article about How does Kamal deploy to multiple hosts and about How to use a remote build server with Kamal

Jared White published a new article about  Tired of Dealing with Arguments? Just Forward Them Anonymously!

Stephen Margheim published a new article about Select dropdown for polymorphic associations

Ender Ahmet Yurt published a new article about Preventing Race Conditions in Rails: A Practical Guide

Artem Avetisyan published an article about Faster Rails fixtures

Lucas M. published an article about Rails transactional callbacks beyond models

Jose Farias published an article about Code Can Be Context-Aware

Ryan Bigg published an article about Scoping an Active Record join

Jared Norman published an article about Advent of Criminally Bad Ruby Code

Suman Awal published an article about Ruby: Speed Up Data Lookups with Hashes vs. Arrays

How-TOs πŸ“

Victor Cobos published an article about How to Customize Rails Form Error Handling

Rails Designer published a new article about Simple accordion without JavaScript

Rishi Jain published a new article about Refactoring Rails: Strategies to refactor models

Best Web Ventures published a new article about published an article about Optimizing Database Performance in Ruby on Rails 8: Modern Techniques & Best Practices

Dennis Paagman published a new article about Building a Native sharing component with Hotwire Native (iOS)

Reply

or to participate.