Notes to self

Business Class 1.6 with direct uploads, antispam, default avatars, and Kamal CD

Here’s the list of freshly baked updates for Business Class, a Rails starter template.

Direct uploads

Business Class goes direct uploads! Forget hunting for the right uploader library or messing with Active Storage integration. Filepond uploads with file size validations and image previews are now available for any form you might have, just add the class .filepond on the input element.

Blog post previews and user avatars are now utilizing it for a far better user experience. Here’s a preview.

Antispam

Spam is not much fun, so I added an invisible captcha to the user registration form. It’s also easily available for all other forms you might have.

Default avatars

I have user avatars feature in the template from the beginning, but working with both an avatar and plain name variants requires lots of UI testing to get things right. And it’s even more difficult on mobile when we cannot reduce the name to a circle button or token. But not anymore, because every user has now an automatic SVG avatar.

Post previews

The simple Framer-inspired blog got a preview feature. You can now open a blog post while writing and see it rendered on the exact same layout used for published posts. A small improvement, but oh so handy!

Kamal’s CD

Business Class has had a GitHub CI workflow from the very beginning, but since we now have a solid Kamal deployment out-of-the-box, I added an automatic deploy step to the workflow. On a completely free GitHub runner you can deploy in a less than 4 minutes. I also split system tests from the rest of the test suite, to get a fast CI feedback loop.

Check out my book
Interested in Ruby on Rails default testing stack? Take Minitest and fixtures for a spin with my latest book.

Get Test Driving Rails and make your tests faster and easier to maintain.

by Josef Strzibny
RSS