<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ruby on MoskitoHero</title><link>https://moskitohero.com/tags/ruby/</link><description>Recent content in Ruby on MoskitoHero</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 06 May 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://moskitohero.com/tags/ruby/index.xml" rel="self" type="application/rss+xml"/><item><title>An introduction to Barley, the fast model serializer</title><link>https://moskitohero.com/post/2025-05-06-an-introduction-to-barley-the-fast-model-serializer/</link><pubDate>Tue, 06 May 2025 00:00:00 +0000</pubDate><guid>https://moskitohero.com/post/2025-05-06-an-introduction-to-barley-the-fast-model-serializer/</guid><description>How I built and open-sourced Barley, a fast and simple model serializer gem for Rails, born from real-world performance needs and benchmarked against the best in the Ruby ecosystem.</description></item><item><title>Ruby Best Practices - Method Arguments</title><link>https://moskitohero.com/post/2024-01-12-ruby-best-practices-method-arguments/</link><pubDate>Fri, 12 Jan 2024 00:00:00 +0000</pubDate><guid>https://moskitohero.com/post/2024-01-12-ruby-best-practices-method-arguments/</guid><description>Simple rules for ordering Ruby method arguments — put optional arguments last, and switch to keyword arguments when you have more than one optional parameter.</description></item><item><title>Love your error messages as thyself</title><link>https://moskitohero.com/post/2022-05-17-learn-your-error-messages-as-thyself/</link><pubDate>Tue, 17 May 2022 07:44:36 +0000</pubDate><guid>https://moskitohero.com/post/2022-05-17-learn-your-error-messages-as-thyself/</guid><description>Stop ignoring error messages and start reading them — it will make you a better developer and help you understand your language from the inside out.</description></item><item><title>Writing code for your future self</title><link>https://moskitohero.com/post/2021-11-21-writing-code-for-your-future-self/</link><pubDate>Sun, 21 Nov 2021 07:44:36 +0000</pubDate><guid>https://moskitohero.com/post/2021-11-21-writing-code-for-your-future-self/</guid><description>A set of guidelines to write clean, readable code that you — and your future self — will thank you for.</description></item><item><title>An alternative to the ActiveRecord after_initialize callbacks</title><link>https://moskitohero.com/post/2020-10-08-an-alternative-to-the-activerecord-after-initialize-callbacks/</link><pubDate>Sat, 03 Oct 2020 00:23:33 +0000</pubDate><guid>https://moskitohero.com/post/2020-10-08-an-alternative-to-the-activerecord-after-initialize-callbacks/</guid><description>Avoiding the callback hell in Rails by creating a simple method in the model to initialize associated records.</description></item><item><title>Chaining conditions in regular expressions</title><link>https://moskitohero.com/post/2020-10-03-chaining-conditions-in-regular-expressions/</link><pubDate>Sat, 03 Oct 2020 00:23:33 +0000</pubDate><guid>https://moskitohero.com/post/2020-10-03-chaining-conditions-in-regular-expressions/</guid><description>Unleash the full power of regular expressions by chaining conditions together.</description></item><item><title>Prevent Devise from sending confirmation emails</title><link>https://moskitohero.com/post/2020-01-26-prevent-devise-from-sending-confirmation-emails/</link><pubDate>Sun, 26 Jan 2020 00:00:00 +0000</pubDate><guid>https://moskitohero.com/post/2020-01-26-prevent-devise-from-sending-confirmation-emails/</guid><description>When you need to import users into a new Rails app using Devise, you may want to skip sending confirmation emails. Here’s how to do it by overriding an instance method in the User model.</description></item></channel></rss>