

Discover more from Short Ruby Newsletter
Jump directly to a section:
๐ย Our Community
๐ย All about Code and Ruby
๐งฐย Gems, Libraries, and Updates
๐คย Related (but not Ruby-specific)
More content: ๐ฅ ๐ง ๐ย (articles, podcasts, videos, and newsletters)
You can support keeping this newsletter free and sustainable for ~1.5$ per week (actually 6.5$/month) if you can afford it:
Read Why subscribe to a paid plan for a longer explanation.
๐ Our Community
๐ I was invited to the Rubber Duck Dev Show to talk about Short Ruby Newsletter.
๐ง Listen to the conversation on The Rubber Duck Dev Show - episode 71
๐ Noel Rappin shared they published an update for Programming Ruby 5th edition:

๐ Brighton Ruby Conference shared buying tickets are available now:

๐ Mario shared a new conference Helvetic Ruby in Switzerland in Europe:

Follow @helvetic_ruby@ruby.social to receive updates about the conference.
๐ Aaron Patterson started a Ruby Glossary:

๐ The Rubber Duck Dev Showย stated that Rails 7.1 would be a giant leap:

Add to this something that Andrew Culver shared previously:

Or this perspective shared by Cezar Halmagean:

๐ All about Code and Ruby
๐ Joel Drapper started a conversation by asking:

He shared more details about the problem he was trying to solve:

And then Benoit Daloze answered with:

If you are interested in this, you should read the entire conversation (elk.zone link)
๐ Tom Stuart shared a piece of code showing a Zeitwerk fork created by Chris Salzberg that can do autoload in namespaces:

Ryan Davis replied with an example showing how to use Kernel#load to achieve something similar:

๐ Joel Drapper shared why it is good to have a `call` method because it plays nice with procs, lambdas, and methods:

๐ Pascal Lalibertรฉ shared a funny take about the Nil object in Ruby:

๐ Aaron Patterson shared they implemented Red Black Tree in Ruby, making use of pattern matching:

Here are two short snippets from the code gist he shared:


๐ Joel Drapper shared a downside of using string-based templating:
He also replied with two possible solutions:

๐ Tom Stuart shared a worry about missing default implementation for Object#deconstruct_keys:

He linked to a discussion (now closed) on the Ruby tracker
๐ Simon George shared a code sample about using to_proc to map a list of data with objects:

deSilva replied with an alternative:

๐ Denis Defreyne shared a take about simple Service Objects that can be replaced with just a method:
๐ Paul Mucur shared a code sample showing how they used pattern matching:

๐ Lucian Ghinda started a discussion on ruby.social and twitter about using `and`:

There are a lot of nice replies and proposals on both threads. Here are some of them:



On the same topic about using `and` and `or` in control flow and see some helpful code samples, here are two resources to read:
Unban
and
andor
control flow operators PR by Victor Shepelev in Ruby-style-guideThis blog post from Victor Shepelev about Good Ruby Idiom: and/or operators
๐ Lucian Ghinda shared a code sample showing that endless methods donโt work with `and`:

๐Dorianย shared a short code sample showing how to reset loaded records from the association:

๐Josef Strzibnyย sharedย a short code sample and explanation about changing the ActiveRecord group when needed:

๐ Jorge Manrubia shared some code snippets from Hey where he implemented memoization:

In the same conversation Xavier Noria shares a link to a minitest-focus code where they implemented `focus` keyword as a kind of โdecoratorโ that can be defined above the method to be focused:

With this, the following code will work:

๐Eric Berryย shared a code sample that helps access instances of models for development purposes:

๐Josef Strzibnyย shared a thread about how to work with localization in Ruby on Rails:

๐Janko Marohniฤย shared an essential perspective about Devise

He then added a link to a podcast with the previous Devise maintainer:

On the other side, there is a tweet from Carlos Antonio (one of the Heartcombo maintainers) sharing this:

In case you are looking for alternatives there were shared the following:
๐ ใใณใใใฏใใคใย shared how to think about the performance of iterating over objects in Ruby:

๐ Steve Politoย shared that Rails provides a way to eager load an association while limiting its result set:

๐ Wiktor Plaga shared a piece of code showing how to use Symbol#with

๐ Alohamori shared in a comment on Reddit some code samples about using implicit parameters and rightward assignment:

If you have read so far and you like the content, maybe you take into consideration sharing this and subscribing:
๐งฐ Gems, Libraries, and Updates
๐งฐ Caleb Hearth published a new gem called mentionable that will implement Webmention (โWebmention is a simple way to notify any URL when you mention it on your siteโ):

You can see an example of how to use it in the article he published This Gem is Mentionable
๐งฐ Joel Drapper announced a new release of Phlex.fun version 1.2. Read the highlights of this release
๐งฐ Bozhidar Batsovย announced they released a new version of Rubocop:ย Release RuboCop 1.44 ยท rubocop/rubocop
๐งฐ Greg Navisย announcedย their gem now reached version 1.0.0 gregnavis/transient_record
๐งฐ Marco Rothย shared a new npm package called current.js that works well with Rails Current Attributes

๐งฐ Samuel Williamsย shared that the latest release of webrick supports full bidirectional streaming:ย Better support for connection upgrade and bi-directional streaming
๐งฐ Ruby Lib Huntย sharedย the open-source repository for OpenStreetMap Website
๐งฐ Hearcombo shared they released version 5.2.0 for SimpleForm gem with support for Rails 7 and Ruby 3.2
๐งฐ Karol Bฤ k announced they made public the repository for shinygems.dev which can be found at kukicola/shiny_gems - it is a Hanami 2 app.
๐ค Related (but not Ruby-specific)
๐ค Andreas Klinger shared a lovely quote about new ideas:

๐ค Dave Paolaย shared a thread about hiring juniors:

You should read the thread. Here is one thing I selected from it:

๐ค Rose Wย shared great advice about pursuing objectives:

๐ค Greg Brockmanย shared an insight about velocity:

More content: ๐ฅ ๐ง ๐
Newsletters
๐ Joe Masilotti published a new edition of Hotwire dev newsletter - edition 21
๐Greg Molnarย shared a new edition of This Week in Rails is out:ย New AssumeSSL middleware, raise on missing translations everywhere, and more
๐๏ธย Ruby Weeklyย published a new edition:ย Packing a Ruby 3.1 app into an executable
๐๏ธย Ruby LibHuntย published a new edition of theย Awesome Ruby Newsletter
๐ Ruby Radar published a new edition Ruby Radar #87 - Brighton on the Horizon
Podcasts
๐ง Andy Croll published a new episode of Chats in the Cupboard: Back into People Management
๐ง FullStack Ruby published a new episode about Hotwiring Multi-Platform Rails Apps with Ayush Newatia
๐ง Brittany Martinย shared a special episode of The Ruby on Rails Podcast with the entire Hanami team: Rubyconf @ Home: Hanami Core Team
๐ง Jason Swettย published a new episodeย 172 - Collin Jilbert, Developer at GoRails - The Code with Jason Podcast
๐ง Ruby For Allย published a new episode aboutย Common Pitfalls for Junior Ruby on Rails Developers | Ruby for All | Episode 27
Videos
Talks
๐ฝ๏ธ Jason Swettย published two episodes from Code with Jason meetup:
๐ฝ๏ธ Drifting Rubyย shared their video version ofย This Week in Rails - Jan 27th, 2023
Screencasts
๐ฅ Hanami Mastery published a new screencast about HTML from markdown made simple!
๐ฅ Drifting Rubyย published a new episodeย Episode 385 - Zipping Files | Drifting Ruby
๐ฅ Deaninย published a new video aboutย ChatGPT Helped Me Make An OpenAI | Ruby On Rails 7 Tutorial
๐ฅ Matt Swansonย shared a video on Twitter about how to build a tiny Rails helper to display Twitter-style metrics like "1.2K โค๏ธ" or "12.7K followers"
๐ฅ Cezar Halmageanย shared a quick video on Twitter showing a quick vim + rubocop tip.
๐ฅ Janko Marohnic shared a live stream showing how to integrate WebAuthn into Rails with Rodauth
๐ฅ Deaninย published a new episode aboutย This New Devise API Gem Makes User Auth So Simple! | Ruby On Rails 7 Tutorial
Articles
Whatโs new
Emmanuel Hayford published the 3rd part of his series about Ruby on Rails 7.1: An Overview Of Ruby on Rails 7.1 Features. Part III.
How-Tos
Hunter Johnson published an article about What are Materialized Views? A 5-Minute Introduction
Caleb Hearth published an article showing how to use mentionable gem to get mentions from web: This Gem is Mentionable
Rails Linksย shared an article about how to configureย Dokku: the best way to host personal projects
Julija Alieckajaย published an article aboutย Unleashing the Power of Fibers for Background Jobs
The Ruby Devย shared an article aboutย Creating a secure API architecture in Rails with few example
Deep Dives
Jake Zimmerman published an article about Problems typing equality in Ruby
Davide Santangeloย sharedย an article about My Adventure With Async Ruby
More general
Steve Sewell published an article about Optimal Images in HTML