Remi Mercier

@remi@ruby.social
207 Followers
177 Following
227 Posts

Freelance Ruby on Rails developer, writer, former stained-glass master (yup!).

I share what I learn about building software on http://remimercier.com. Swears a lot when nobody's watching.

🏳️‍⚧️ Trans lives matter

📝 Where I writehttps://remimercier.com
🔔 Get notified about new postshttps://remimercier.com/newsletter/
🙋🏻‍♂️ Hire me!https://remimercier.com/work/
💖 Membership Programhttps://github.com/sponsors/merciremi

I wrote up quite a beefy post with some thoughts on delegate_types and improving the API.

I like writing these, but is this the kind of stuff you're all interested in?

https://kaspth.com/posts/making-rails-delegated_types-clearer

Making Rails delegated_type’s clearer - Kasper Timm Hansen

This past week, I was having a conversation with a reader and he brought up the example of Rails’ delegated_type. While I’ve never been a fan of the name, because...

Kasper Timm Hansen

What is the root¹ issue with agentic AI? by @Mer__edith

¹ no pun intended I swear

@janpet @kaspth I've checked your questions, and the one I'm sure about is that:

Yes, you always have to initialize a Report (parent class) and a CoverSheet (child class). You can't just initilalize a child class on its own. I've tried it, doesn't work (well, you can make it work, but at what cost 😅).

I remember hitting a `ActiveRecord::HasManyThroughNestedAssociationsAreReadonly` but I can't remeber for the life of me how i solved this one.

@janpet I wrote about some of the pitfalls I encountered when working with DT in the past: https://remimercier.com/delegated-types/ It might help! Yell if it doesn't!

Also @kaspth just wrote something of his own here: https://kaspth.com/posts/making-rails-delegated_types-clearer More about making the API better, but it gives some good knowledge on the design.

Delegated types in Rails: a real-life application - Remi Mercier - Software Developer

Delegated types are a modelization pattern introduced in Rails in 2020. And developers have mostly been scratching their head for a few years trying to use them in their applications. Today, I want to share a real-world use case. I'll walk you through my pre-existing domain architecture, my initial requirements, my mistakes, how I eventually used delegated types, what I learned and my open questions.

Rémi Mercier - Software Developer
Currently brewing a brewdog "hops kill nazis"
i hope the first one works because i just don’t think i can fit a second one in there
@marcoroth glad that you like my idea, I will try to open issues to support each of the a11y supported linter rules on Herb repo
The Ruby extension v0.10.0 for Zed editor is out, featuring Herb LSP by @marcoroth and bundle-aware debugger support. Happy vide coding!
@marcoroth @zeddotdev @vitallium Yeah! I'll be able to test it out!

The Herb Language Server is now also available in @zeddotdev in the latest version of the official Ruby extension!

Big thanks to @vitallium for maintaining the extension and making Ruby a very well supported language in Zed! 🙌🏼
https://fosstodon.org/@vitallium/114753586649431589

Vitaly Slobodin (@vitallium@fosstodon.org)

The Ruby extension v0.10.0 for Zed editor is out, featuring Herb LSP by @marcoroth@ruby.social and bundle-aware debugger support. Happy vide coding!

Fosstodon