Hello,
Iโm @lucianghinda, the curator of this newsletter. If you want a short excerpt of this newsletter containing only some of the images with code, I created one here. But I invite you to read the entire newsletter as it has excellent content ๐.
If you like it and want to help me reach a wider audience, I would kindly ask you to leave some feedback/short written testimonial that I can display on the About page.
This edition was created with support from @adrianthedev from Avo for Ruby on Rails (a friendly full-featured Rails admin panel) and from @jcsrb, who sent me recommendations to include in the newsletter.
If you have any feedback or ideas about this newsletter, please reach out on Twitter or via email at hello@shortruby.com
๐ Thiago Massaย sharedย about how to do a proper Ruby memoization in Ruby

๐ Shino Kouda shared an example of how to use enum in Rails with integer type and this generated a good discussion about possible issues generated by this approach and how to overpass them:

๐ Josh Cheek shared that when using Postgres, one can define a Postgres Enum type. Here is the gist he created that works by adding the enum type with raw SQL. If you want to do this with Rails 7 it added support for this enum type:
If you want to add a new enum, you will need to write raw SQL with ALTER TYPE. See Rails 7 guides for enumerated types
About using integers for enums, here is a good discussion explaining the pros and cons:

Joel Drapper then proposed using a gem he wrote:


๐ Kirill Shevchenkoย sharedย an example of encoding and decoding JSON with gRPC:

๐ Stefan Vermaasย sharedย how to display flash messages with Turbo in Rails:

๐ Nate Berkopecย sharedย how to profile an entire Rails boot sequence:

There is a good discussion there about various ways to achieve that. While replying to the thread, Jean Boussier did a PR to stackprof gem to make this happen quickly with the following command:
๐ Shino Koudaย sharedย code sample about parsing a JSON and instantiating objects using a feature of JSON.parse:

Just note that using OpenStruct will affect your performance. Here is what the official Ruby documentation says about OpenStruct:
๐ Tim Rileyย sharedย a thread about making Hanami faster:

๐ Kirill Shevchenkoย sharedย a code sample to show how to open IRB console within the current scope:

๐ Benito Sernaย sharedย a sample code about polymorphic rendering with ActiveModel and ActionView:


๐ Justin Searlsย sharedย his opinion about why he recommends people to avoid RSpec.

This generated a lot of responses. You should read the entire thread and also click the quoted tweets. Here is just a summary, but please read those two links to make up your own conclusion:
๐ Kirill Shevchenkoย sharedย a code sample showing curry for procs

๐ Thiago Massaย sharedย a code sample with .() shorthand syntax for .call:

Joel Drapper also added the double dot notation works, and it does the same:

๐ Nate Hopkinsย sharedย a script to work with libraries that are incompatible with Turbo Drive as they assume that the document head is loaded and parsed on every page visit:

๐ Dave Paola shared that they launched a new project - a development agency with the mission to be the place where Junior Ruby on Rails developers start their careers:

๐ Meghan Gutshall asked a question about how to explain a Ruby class:

Here are some replies, but you can find more in the thread:
If you read so far and you like the content, maybe you take into consideration sharing this and subscribe:
Related (but not Ruby specific)
Celso de Sรกย asked about what it means to be a mid-level Ruby developer. Here are some of the answers to this question:
I think you should also take a look at โgeekery skillsetโ proposed by GeePaw Hill:

Joe Masilotti ๐ย sharedย a nice trick to skip running Github Actions:
![TIL that you can skip running your GitHub Actions by adding [skip ci] to a commit message. [skipci] (no space), however, does NOT skip CI. TIL that you can skip running your GitHub Actions by adding [skip ci] to a commit message. [skipci] (no space), however, does NOT skip CI.](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73aad67f-5188-45f3-9fba-abf31f8a41a5_1600x400.png)
Read the documentation for this here.
Tobias Petry.Sqlย sharedย a database tip about making the index invisible:

Brandon Weaverย sharedย about seniority and self-marketing:


You can read the full thread here or the article Brandon wrote expanding this on this blog: Beyond Senior โ The Peacock, the Hermit, and the Counsel
Articles and Videos
Courses or Books or Communities
Brandon Weaverย sharedย launched a new community focused on learning Ruby. The discord invitation is this one, and the main website is rubylearning.dev. This week we already started working as a group on the book Rebuilding Rails by Noah Gibbs.
Kasper Timm Hansenย sharedย an update about his course called Product Focused Ruby.
Something to read
Soutaro Matsumotoย sharedย their presentation slidesย from RubyKaigi about how to use Ruby types. See the slides here.
Newsletters
Greg Molnarย sharedย a new issue of This Week in Rails written by Petrik de Heus
Andrew Mason shared a new issue of The Ruby Radar. Read 68: Hack the Planet!
David Colby shared a new issue of Hotwiring Rails. Read Hotwiring Rails - September 2022
Awesome Ruby Newsletter released their 330 newsletter. Read 330 Awesome Ruby Newsletter
RubyWeekly published its 620 newsletter. Read Ruby Weekly #620
Articles
Eric Berryย sharedย that they wrote about how to use fswatch to build a Rails watcher/runner
Joe Masilotti ๐ย sharedย a list of 10 of his favorite online communities for Ruby and Rails communities.
Joรซl Quennevilleย sharedย about Working Iteratively
Something to watch ๐ฅ or listen ๐ง
Videos
๐ฅ Drifting Rubyย sharedย a new episode of the video newsletter for This week in rails. Watch โ This Week in Rails Sept 17th, 2022
๐ฅ Joel Drapper shared a session where he started converting a large ERB to Phlex and then discovered and fixed a bug. Watch โ Just trying out
๐ฅ The Rubber Duck Dev Show shared a new episode with Brittany Martin and Josh Gaastra about Engineering Managers and Product Managers. Watch โ EM vs PM! with Brittany and Josh
๐ฅ Avo shared a video doing a walkthrough of the new features they released. Watch โ Avo Admin 2.15 for Ruby on Rails
Audio & Podcasts
๐ง Jason Sweet launched a new episode of the Code with Jason podcast where he invited Adrian Marin to talk about Avo and how it is to make tools for developers. Listen โ 161 - Adrian Marin, Founder of Avo Admin
๐ง Joรซl Quennevilleย sharedย a new episode of The Bike Shed with Sara Jackson where they talk about The History of Computing. Listen โ 354: The History of Computing
๐ง Ruby For Allย sharedย a new episode about Bridgetown. Listen โ Episode 8: What is Bridgetown. If you like this you should consider joining the Jared White Discord community The Spicy Web
๐ง Remote Rubyย sharedย a new episode where they invited Joel Drapper to talk about Phlex: Listen โ Phlexing with Joel Drapper
Gems, Libraries, and Updates
๐งฐ Avo shared they released a new version with a lot of features. See the changelog
๐งฐ Postmodernย sharedย they added ruby 3.2.0 preview 2 to ruby install. See the changelog here. Thus now, the following command should work:

๐งฐ JRuby Dev Teamย sharedย they released version 9.3.8.0 which includes โa CVE fix for the Psych YAML library, support for lightweight fibers using Java 19 virtual threads, and a bunch of compatibility and bug fixesโ. See changelog
๐งฐ Marco Rothย sharedย that Turbo 7.2 rc1 was released. See the changelog
๐งฐ Postmodernย sharedย a gem named sord that will transform YARDoc into o Sorbet definitions.
๐งฐ Mike Perhamย sharedย they released Sidekiq Pro 5.5.4 โfixes a batch race condition which could cause the batch pending count to read -1โ. See changelog
๐งฐ Rubygems Newsย shared an update for a library called Spy which is a new way of mocking:

๐งฐ Nate Berkopecย sharedย a new library fixture_factory that helps to work with fixtures like factories. Here is a code sample:
๐งฐ Andrew Mason shared a new library they discovered Capybara Test Helpers. Here is what it looks like:
Please consider sharing this on social media or with your colleagues:
If you have any feedback or ideas about this newsletter, please reach out on Twitter or via email at hello@shortruby.com