yes@petr.codes
Blog Resume
Blog Resume

Rails

Business logic in Rails with operators

19 Oct 2021

ruby, rails, business logic, poro

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 my solution for business logic in the Rails app.

Rails

Fun with Rails Enums and PORO

5 Oct 2021

ruby, rails, enum, 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).

Rails

Multi-Factor Authentication for Rails with WebAuthn and Devise

27 Sep 2021

ruby, rails, devise, webauthn, 2fa, mfa, security keys

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.

Rails, Modern Rails flash messages

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

7 Jul 2021

rails, ruby, stimulus, turbo

I can not believe it has been almost 10 months since I wrote the first part. Several things have happened since then. Like Turbo…

Bridgetown

How to generate sitemap.xml with Bridgetown

28 Mar 2021

bridgetown, sitemap

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

Dokku

Using Dokku with Let's Encrypt wildcard certificate

21 Mar 2021

dokku, lets encrypt, wildcard

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.

Showing 1 to 6 of 8 posts

Next
Mastodon LinkedIn GitHub GitLab WordPress

© 2023 Petr Hlavicka.
Built with Tailwind CSS, Tail-kit, Bridgetown and