DirectUpload allows you to upload files to your file storage without having to wait for the form to submit. It...

ActiveStorage does not provide any built-in way of implementing authentication for the available DirectUpload endpoint in Rails. When using...

PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or...

Method delegation in Rails can help you to keep your code organized and avoid deep call chains (law of demeter...

Here is a bash script that I use to auto-configure displays on Ubuntu 24.04 with Xorg. Background

When debugging slow SQL queries, it’s helpful to understand the database engine's query plan. Whenever you execute a...

Rails wraps your parameters into an interface called StrongParameters. In most cases, your form submits your data in a nested...

makandra dev
impactahead.com

Also see the list of IRB commands. Switching the context Changes the "default receiver" of expressions. Can be used to...

To reverse lookup a fixture by its table name and id, use the following approach on ActiveRecord::FixtureSet: table = 'users...

In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...

evilmartians.com

Some key highlights and points from the linked article TestProf II: Factory therapy for your Ruby tests. The Problem with...

When Ruby objects are inspected in any modern IRB, some objects (like ActiveRecord instances) are rendered with neat colors and...

makandra dev

A lesser known fact about PG enums is that they are ordered. This can be really handy when values have...

We recently migrated a Rails application from yarn to npm. We decided to go this step instead of upgrading to...

Rails 7.1 added the normalizes method which can be used to normalize user input. It lets you define the fields...

masilotti.com

Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures...

While the main goal always is to prevent long-running queries in the first place, automatic timeouts can serve as...

github.com

When handling nested hashes the RSpec output is often hard to read. Here the gem super_diff could help.

This talk shows simple and advanced usages of the ruby/debug debugger. It goes through a step by step debugging workflow...

On our Ubuntu machines we have nautilus file manager with nautilus-extension-gnome-terminal installed. This adds an entry to...

I recently stumbled upon the Rails feature composed_of. One of our applications dealt with a lot of addresses and...

You can improve your LIKE / ILIKE search queries in PostgreSQL by adding a GIN index with an operate class ("opclass...

Recently I needed to benchmark an Active Record query for performance measurements. I wrote a small script that runs each...

testing-library are widely used testing utilities libraries for javascript dependent frontend testing. The main utilities provided are query methods...