-
Radio Pills with Tailwind
Here is a quick tip on building “radio pills” with TailwindCSS, inspired by Scott O’Hara’s brilliant work. The goal here is to make an accessible form element that also has visual polish and purpose.1
Continue reading … -
Rails security quick wins
I recently launched a major new feature for an application I maintain at $dayjob, and I needed to ensure that the application followed current basic security best practices. It took me a couple of hours to track everything down, so I thought I would document it here for future reference. So, let’s dig into some quick wins for Rails security.
Continue reading … -
Rails engine migration generator with support for multiple databases
Rails supports multiple databases. This means you can specify which database to point a migration at when you use a generator (e.g.
Continue reading …bin/rails generate migration CreateDogs name:string --database animals
). For gems, when you are creating a Rails engine, you will often need to create some tables, so you register a generator to install the migrations (e.g.bin/rails generate my_gem:install
). I want to ensure that the generator I am providing from my engine/gem allows the user to specify a specific database, and my gem respects that. With the help of some folks from Twitter, I figured out the requirements.