-
Always use
flex-wrap: wrap
on flex containersI spent a bit of time this morning make some improvements to sqlite.directory, and I found myself needing to make a number of fixes around the mobile responsiveness of the UI. So, I thought I would take a moment to catalog a few common patterns and tips I have found useful when working with responsive design. This first tip was one that I found myself using quite a bit today.
Continue reading … -
Select dropdown for polymorphic associations
When building a CRUD-oriented web application with Ruby on Rails, most things are pretty straightforward. Your tables, models, controllers, and views all naturally align, and you can lean on the Rails scaffolds. One gap, however, is dealing with polymorphic associations in your forms. Let’s explore how global IDs can provide us with a simple solution.
Continue reading … -
Loading extensions
Rails continues to expand its lead as the single best platform for building web applications backed by SQLite! You can now load extensions directly from the
Continue reading …database.yml
file. This now means you have quick and easy access to the full range of SQLite extensions. This is a major step forward from the previous way, which required writing a custom initializer or using the enhanced adapter. -
Supercharge the One Person Framework with SQLite: Rails World 2024
Continue reading … -
Manipulating
database.yml
This is the second in a series of posts on building powerful and resilient Rails application templates. In the previous post, we discussed parsing and emitting YAML files with comments. Today, we will be looking at manipulating the
Continue reading …database.yml
file’s AST. -
Parsing and emitting
database.yml
Recently, I have been working on Rails application templates. These are scripts that can be run with
rails new
to enhance or extend the setup of a new Rails application with a specific configuration. They can also be ran against existing Rails applications usingrails app:template
. So, they are a powerful tool for automating certain kinds of configuration, modification, and setup tasks. But, there are also many limitations and stumbling blocks to what you can do with them.In this series, I will be sharing some of the things I have learned while working on these scripts. This post is about the difficulty of manipulating the
Continue reading …database.yml
file. Let’s jump into it. -
Problems with a backoff busy handler
In the process of getting the non-blocking
Continue reading …busy_timeout
from thesqlite3
gem used in Rails, I needed to explore the differences between a busy handler implementation that uses a backoff and one that simply polls on a consistent interval. What I found was that a busy handler that backs off kills “tail latency” (how long it takes for the operation in the worst cases). This is because the SQLite “retry queue” behaves very differently from a more traditional queue that we tend to work with and think about, like a background job queue. -
Update to Litestream gem
Version 0.5.1 of the Litestream is out. The 0.5.x versions of the gem adds a new
Continue reading …restore
command along with some useful introspection commands, making it simple to restore a database from a remote backup. This is a huge feature that makes Litestream even more useful. -
The how and why of optimal performance
Continue reading … -
Update to Solid Errors
Version 0.4.2 of Solid Errors is out. The 0.4.x versions of the gem adds a number of awesome new features, most notably email notifications. If you need a self-hosted error tracking solution for your Rails application, Solid Errors is a great choice.
Continue reading …