Matheus Richard

@matheusrich
45 Followers
62 Following
84 Posts

🇧🇷 Senior developer @ thoughtbot.

📝 Blogging @ https://tbot.io/blog/matheus

💎 Organizer of http://rubydf.com

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"
```

https://edgeapi.rubyonrails.org/classes/ActiveRecord/Integration/ClassMethods.html#method-i-to_param

ActiveRecord::Integration::ClassMethods - Ruby on Rails API

I forgot to share, but about a month ago I got my first commit into @crystalLanguage! You can use this if you're on Crystal >= 1.17

O Ruby DF volta dia 16 de Agosto numa edição especial para iniciantes! Garanta sua vaga: https://forms.gle/hK6GsRUErUM7pkHT6

PS.: Tem coffee break também 😋

BTW, this was going to be a tweet, but grew enough to be a short blog post. Yay for searchability!

How hard can extracting an emoji from a string be? Well...

https://thoughtbot.com/blog/what-you-see-may-not-be-what-you-get

What you see may not be what you get

The characters you see hide a more complex reality.

thoughtbot

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!

https://github.com/rails/rails/pull/53119

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...

GitHub

TIL you can download an .epub version of the Rails guides!

https://guides.rubyonrails.org/epub/ruby_on_rails_guides_v8.0.2.epub

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.

https://www.youtube.com/watch?v=ozayFBNKO2M

RailsConf 2025 Ruby Internals: A Guide For Rails Developers by Matheus Richard

YouTube

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)