Sign in

Matheus Richard

@matheusrich.bsky.social
56 followers 58 following 77 posts

👨🏽‍🍼 Father 🇧🇷 Senior developer @ thoughtbot. 📝 Blogging @ tbot.io/blog/matheus 💎 Organizer of rubydf.com

PostsRepliesMedia
Matheus Richard @matheusrich.bsky.social · 16/06/2026
If touching production data gives you the shivers, this talk is for you. At @tropicalonrails, I shared some practical ways to make production data changes safer, calmer, and less scary: www.youtube.com/watch?v=c6l6...
youtube.com
Matheus Richard: Production Data Doesn't Have to Be Scary
YouTube video by Tropical on Rails
010
Reposted by Matheus Richard
Blastoff Rails @blastoffrails.bsky.social · 21/05/2026
Are you still having fun when you code? Have you ever wanted to make a game with Ruby? @matheusrich.bsky.social is here to reignite that fire in you!
032
Matheus Richard @matheusrich.bsky.social · 08/05/2026
Nice addition in Rails: now when validates_uniqueness_of fails, you'll be able to access the ID of the record that caused the conflict github.com/rails/rails/...
github.com
Add conflicting record ID to `validates_uniqueness_of` error details by bvicenzo · Pull Request #55826 · rails/rails
Motivation and Background Currently, when a validates_uniqueness_of validation fails, the errors.details hash only provides { error: :taken, ... }. This indicates that a conflict exists but offers ...
010
Matheus Richard @matheusrich.bsky.social · 30/04/2026
Just deleted ~1.6k LOC and ~770 KB of JS by replacing a chart library (and all of its deps) with a Ruby helper that renders the charts as plain HTML/CSS. CSS Anchor Positioning made this basically JS-free.
000
Matheus Richard @matheusrich.bsky.social · 22/04/2026
Inspired by @nateberkopec.bsky.social, I wrote about why and how you should enable MFA for your gems! If you don't have any gems, this can be one of the easiest open-source contributions you can make! Check it out: thoughtbot.com/blog/lets-en...
thoughtbot.com
Let's enable MFA for all Ruby gems
Supply chain attacks are getting more common. RubyGems might be next. Here’s how to help the ecosystem be safer.
010
Matheus Richard @matheusrich.bsky.social · 17/03/2026
No one sets out to write a slow test, and yet it happens. Prevent slow tests from creeping into your test suite again! Tests are not enough, we need *fast* tests! thoughtbot.com/blog/introdu...
thoughtbot.com
Introducing Test Budget: a linter for test performance
Your test suite didn’t get slow all at once. It won’t get fast all at once either. Start by making sure it stops getting worse.
000
Matheus Richard @matheusrich.bsky.social · 09/03/2026
Here's one of those things that are easy to miss on code review and will make your tests super slow. Good news: it's easy to fix! thoughtbot.com/blog/combine...
thoughtbot.com
Combine Capybara selectors to avoid the sequential timeout trap
How I shaved over a minute off a test suite with a one-line change.
000
Matheus Richard @matheusrich.bsky.social · 15/01/2026
TIL about Rails' image_submit_tag api.rubyonrails.org/v8.1.2/class...
api.rubyonrails.org
ActionView::Helpers::FormTagHelper
Action View Form Tag Helpers¶ ↑ Provides a number of methods for creating form tags that don’t rely on an Active Record object assigned to the template like FormHelper does.
010
Matheus Richard @matheusrich.bsky.social · 07/01/2026
This was a fun one to write!
010
Matheus Richard @matheusrich.bsky.social · 17/11/2025
Today I learned about Rails' Time.days_in_month and Time.days_in_year. So handy!
Time.days_in_month(2) # defaults to current year
# => 28
Time.days_in_month(2, 2024)
# => 29
Time.days_in_year # defaults to current year
# => 365
Time.days_in_year(2024)
# => 366
030
Matheus Richard @matheusrich.bsky.social · 24/10/2025
🎉 end_of_life 1.0.0.alpha is released! It includes: - Macos install via homebrew - Support for scanning EOL Node.js versions - Support for detecting versions from `mise.toml`. - A new `check` command to check if specific product releases are EOL - A revamped CLI Stay updated!
000
Matheus Richard @matheusrich.bsky.social · 20/10/2025
TIL about Git LFS: An open source Git extension for versioning large files git-lfs.com
git-lfs.com
Git Large File Storage
Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.co...
042
Matheus Richard @matheusrich.bsky.social · 17/09/2025
Just shaved 200-250ms from a CLI app by just requiring dependencies only when they're needed. It might not seem much, but it really matters to get that snappy feel.
010
Matheus Richard @matheusrich.bsky.social · 16/09/2025
This is my favorite 404 page
The RubyGems.org 404 page
120
Matheus Richard @matheusrich.bsky.social · 10/09/2025
Did you know that Rails 7.1 stops receiving security updates in 3 weeks? Wished that you had a tool that would inform you about this kind of stuff? Well, end_of_life v0.5 was just released and it now supports Rails! Check it out: github.com/MatheusRich/...
000
Matheus Richard @matheusrich.bsky.social · 08/09/2025
I've hacked the first version of end_of_life in a weekend. I had limited time, so I decided to only support Ruby. It served me well for years, but I thought it was time to expand support for other tools (Rails, Node, Python, databases, etc).
100
Matheus Richard @matheusrich.bsky.social · 04/09/2025
If you wanna use Rails 8.1 today, you can check if there's anything new in the dotfiles, Dockerfile, or the generated authentication system using rails-diff: github.com/MatheusRich/...
github.com
GitHub - MatheusRich/rails-diff: Compare Rails-generated files with the ones in your repository
Compare Rails-generated files with the ones in your repository - MatheusRich/rails-diff
220
Matheus Richard @matheusrich.bsky.social · 03/09/2025
The amount of event listeners LLMs suggest when writing Stimulus controllers makes me think most people are not making the most out of Stimulus targets.
000
Matheus Richard @matheusrich.bsky.social · 03/09/2025
TIL about the Zen browser. Looks cool! zen-browser.app
zen-browser.app
Zen Browser
Beautifully designed, privacy-focused, and packed with features.
000
Reposted by Matheus Richard
Tim Riley @timriley.info · 01/09/2025
Join me at @thoughtbot.com’s Open Summit this year! I’m extremely excited to be part of this event. Even better, it’s *free* and *online*, so I hope I can see you there! timriley.info/posts/join-m...
timriley.info
Join me at thoughtbot’s Open Summit! - Tim Riley
I’m delighted to be joining the thoughtbot Open Summit on 31st October this year! What is Open Summit? From the announcement: “a live, interactive, hands-on day of pairing and solving open...
024
Matheus Richard @matheusrich.bsky.social · 26/08/2025
This is exciting!
andre.arko.net
rv, a new kind of Ruby management tool
For the last ten years or so of working on Bundler, I’ve had a wish rattling around: I want a better dependency manager. It doesn’t just manage your gems, it manages your ruby versions, too. It doesn’...
030
Matheus Richard @matheusrich.bsky.social · 19/08/2025
I remember a time where GitHub had a team dedicated to fixing small user pain points. Now everyone complains about it being slow and adding AI features. What a change.
010
Matheus Richard @matheusrich.bsky.social · 15/08/2025
TIL about `ActiveRecord.to_param`. I've always defined `#to_param` manually ``` class User < ActiveRecord::Base to_param :name end user = User.find_by(name: 'Fancy Pants') user.id # => 123 user_path(user) # => "/users/123-fancy-pants" ```
000
Matheus Richard @matheusrich.bsky.social · 07/08/2025
I forgot to share, but about a month ago I got my first commit into Crystal! You can use this if you're on Crystal >= 1.17
# Ensuring string suffix and prefix

New convenience methods String#ensure_suffix and String#ensure_prefix for adding a specific prefix or suffix but only if not already there (#157822):

```
"foo" .ensure_suffix("/") # => "foo/"
"foo/" .ensure_suffix("/") # => "foo/"
"Foo" .ensure_prefix("::") # => "::Foo"
"::Foo".ensure_prefix("::") # => "::Foo"
```
010
Matheus Richard @matheusrich.bsky.social · 06/08/2025
How hard can extracting an emoji from a string be? Well..
100
Matheus Richard @matheusrich.bsky.social · 04/08/2025
Rails now has a `credentials:fetch` command. This is useful to extract a credential and add to Kamal secrets, for example: KAMAL_REGISTRY_PASSWORD=$(rails credentials:fetch kamal.registry_password) No need to use rails runner just for that anymore! github.com/rails/rails/...
github.com
Add credentials:fetch command by n-studio · Pull Request #53119 · rails/rails
Motivation / Background With Kamal 2, secrets are now stored in .kamal/secrets. We are expected to use a 3rd party password manager such as 1password to fetch secrets such as KAMAL_REGISTRY_PASSWOR...
010
Matheus Richard @matheusrich.bsky.social · 01/08/2025
Hey, I'm on This Week in Rails world.hey.com/this.week.in...
# Add relative time in words helper to ActionView

This pull request introduces a relative_time_in_words helper:

```
relative_time_in_words(3.minutes.from_now) # => "in 3 minutes"
relative_time_in_words(3.minutes.ago) # => "3 minutes ago"
relative_time_in_words(10.seconds.ago, include_seconds: true) # => "less
than 10 seconds ago"
```
010
Matheus Richard @matheusrich.bsky.social · 31/07/2025
TIL you can download an .epub version of the Rails guides! guides.rubyonrails.org/epub/ruby_on...
guides.rubyonrails.org
010
Matheus Richard @matheusrich.bsky.social · 30/07/2025
Ever wondered how Ruby works under the hood? No need to take a compilers class to get that! You can watch my #RailsConf talk to understand the basics. Along the way you might even write your first programming language. www.youtube.com/watch?v=ozay...
youtube.com
RailsConf 2025 Ruby Internals: A Guide For Rails Developers by Matheus Richard
YouTube video by Ruby Central
010
Matheus Richard @matheusrich.bsky.social · 28/07/2025
I feel like half of my web problems would be solved if 1. styling select fields was widely available, and 2. select multiple=true had a good default experience (select on click + search + better styles)
000
Matheus Richard @matheusrich.bsky.social · 25/07/2025
🎉 rails-diff v0.6.0 is released! This version includes: - a `--only` option to only include specific files or directories in the diff - a new `dotfiles` command to compare dotfiles (configuration files like .rubocop.yml) Enjoy! rubygems.org/gems/rails-d...
rubygems.org
rails-diff | RubyGems.org | your community gem host
000
Reposted by Matheus Richard
Chris Oliver @excid3.com · 25/07/2025
All the talks from the final RailsConf are now posted! www.youtube.com/playlist?lis...
youtube.com
RailsConf 2025 (Philadelphia) - YouTube
RailsConf is the world’s longest-running gathering for the Rails community. Since 2006, we have brought together developers and enthusiasts of all levels alo...
091
Matheus Richard @matheusrich.bsky.social · 24/07/2025
I just made an app test suite 3x faster by just using rack test instead of selenium on every system test that didn't need JS interactions!
010
Matheus Richard @matheusrich.bsky.social · 23/07/2025
I *think* I found a bug on Stimulus (or Chrome?). When clicking on a autocomplete suggestion, it triggers an action even if it doesn't match the KeyboardEvent filters. Reproduction here: codepen.io/matheusrich/...
codepen.io
Stimulus Bug?
...
000
Matheus Richard @matheusrich.bsky.social · 18/07/2025
In Rails 8.1, when you get an error you will be able to click the line number and it will open your editor on that exact spot! PR: github.com/rails/rails/...
github.com
Add support to open files in the source code editor from the crash page by igorkasyanchuk · Pull Request #55295 · rails/rails
Fix: #46378 Motivation / Background My main motivation is to make life easier. I want to be able to open my Cursor directly from the browser. Detail I want to make it a part of Rails. For backward ...
010
Matheus Richard @matheusrich.bsky.social · 16/07/2025
CSS might get an if function soon: developer.chrome.com/blog/if-arti... ``` button { aspect-ratio: 1; width: if(media(any-pointer: fine): 30px; else: 44px); } ```
developer.chrome.com
CSS conditionals with the new if() function  |  Blog  |  Chrome for Developers
Learn about the new CSS if function, which enables a cleaner developer interface for dynamic styles like style queries and media queries.
010
Matheus Richard @matheusrich.bsky.social · 16/07/2025
I've used AI to write so many useful little scripts for me. It is such a time saver!
100
Matheus Richard @matheusrich.bsky.social · 10/07/2025
Do we really need to manually invalidate Russian doll caches on many-to-many relationships on Rails? This doesn't seem right. evrim.io/invalidating...
100
Matheus Richard @matheusrich.bsky.social · 05/07/2025
Rails (via @fxn.bsky.social) just added support for marking associations as deprecated: ``` has_many :posts, deprecated: true ``` With that, Active Record will report any usage of the posts association. There are three reporting models: warn, raise, and notify. github.com/rails/rails/...
github.com
Deprecated associations by fxn · Pull Request #55285 · rails/rails
Overview This patch adds the ability to deprecate associations: has_many :posts, deprecated: true With that, Active Record will report any usage of the posts association. There are three reporting ...
010
Matheus Richard @matheusrich.bsky.social · 03/07/2025
I'd love if Rails had e2e encryption (built-in). Has anyone build something like that before?
000
Matheus Richard @matheusrich.bsky.social · 27/06/2025
TIL about the name_of_person gem. Pretty cool! github.com/basecamp/nam...
github.com
GitHub - basecamp/name_of_person: Presenting names of people in full, familiar, abbreviated, and initialized forms (but without titulation etc)
Presenting names of people in full, familiar, abbreviated, and initialized forms (but without titulation etc) - basecamp/name_of_person
000
Matheus Richard @matheusrich.bsky.social · 24/06/2025
If you're building a PWA with Rails don't forget to ensure that you're rendering valid JSON on routes like /manifest.json. I've added a test for that:
require "test_helper"
require "json"

class ManifestJsonTest < ActionDispatch::IntegrationTest
  test "GET /manifest returns valid JSON" do
    get "/manifest.json"
    assert_response :success
    assert_nothing_raised do
      JSON.parse(@response.body)
    end
  end
end
000
Matheus Richard @matheusrich.bsky.social · 18/06/2025
accent-color is so easy and useful. CSS gets better everyday!
000
Matheus Richard @matheusrich.bsky.social · 06/06/2025
The Ruby dev iceberg
000
Matheus Richard @matheusrich.bsky.social · 04/06/2025
So now that I have a Bluesky account I have to check X, Mastodon and Bluesky to follow Ruby-related stuff. I'm glad @shortruby.com exists, but still... I'm almost building my own stuff that joins it all.
040
Matheus Richard @matheusrich.bsky.social · 03/06/2025
There has been a push towards fixtures for a while, but this global shared state is hurting me. It's hard to know which records are available for any given test, or if I should just modify a particular record for the current test. You change one thing, it breaks a test elsewhere.
320