RSSAmplifier

Blog

Petr Hlavicka

Product-minded software engineer. Web application development.

petr.codesRSS feed ↗10 posts

Latest posts

Versioning API requests

Learn how to handle API request versioning in Rails without duplicating controllers, using a schema-based approach that supports OpenAPI documentation and seamlessly maps external API structures to internal models.

Flexible API Versioning with Rails

A well-defined API versioning strategy is crucial for any API expected to evolve. Let's explore the most common API versioning strategies and develop a flexible one in Rails.

Gem Credentials Management with Gemstash

How can we efficiently manage gem credentials across the team? When your project grows, you may reach out to commercial gems for help or want to extract some business logic into private gems.

Business logic in Rails with operators

Having a thousand lines long controllers and/or models is not the right way to have sustainable applications or developers' sanity. Let's look at this straightforward solution for business logic in the Rails app.

Fun with Rails Enums and PORO

I really like enums. They can be really powerful if they are used wisely. Let's see what we can do with them in a multilingual Rails app with a little help from PORO (Plain Old Ruby Object).

Multi-Factor Authentication for Rails with WebAuthn and Devise

There are several ways to add multi-factor authentication (MFA) for safer user authentication. Let's look at how to add a modern MFA approach to a Rails application with WebAuthn.

Modern Rails flash messages (part 3): Refactoring with Turbo

Several things have happened since the first part. Like Turbo. The demo application still works, but a few changes needed to be made to support Turbo.

How to generate sitemap.xml with Bridgetown

During playing with Bridgetown (that I am using on this site), I needed to add a sitemap.xml file for search engines.

Using Dokku with Let’s Encrypt wildcard certificate

Wildcard certificates are handy and this was the first time when I needed to use them with Dokku. It was a little bit harder than I expected, but luckily, it is doable even with automatic renewal.

Modern Rails flash messages (part 2): The undo action for deleted items

In the previous article, I've prepared a way how to add actions to the Rails flash messages. In this article, I will explore one way how to use them for the undo action for deleted records.