When you want to filter records in a model where a string column roughly matches a given term, you can...

You can check the maximum client Redis database size in Sidekiq with this command. Sidekiq.redis { |redis| puts redis.info.fetch('maxmemory_human...

Why Rails has multiple schema formats When you run migrations, Rails will write your current database schema into db/schema.rb. This...

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...

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

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...

makandra dev

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

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...

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...

makandra dev
github.com

I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...

makandra dev

While most Rails Apps are tied to at least one external REST API, machine-to-machine communication via GraphQL is...

Using Capistrano, we usually have some array configurations in the config/deploy.rb file, like set :linked_files, %w[config/database.yml], so in...

I used two lab days to read the The framework field guide - Fundamentals, the first of a three part series...

We are using assignable_values for managing enum values in Rails. Nevertheless Rails is adding more support for enum attributes...

makandra dev

Postgres works differently See PostgreSQL: Difference between text and varchar columns for PostgreSQL-specific info MySQL has 4 different column...

Debugging performance issues in your Rails app can be a tough challenge. To get more detailed insights consider using the...

Developing or debugging SAML functionality can be a hassle, especially when you need to go back and forth with someone...

makandra dev

10.0.0 2024-03-07 Compatible changes console command: You can now globally disable the IRB multiline feature by setting irb...

I recently built a screen with a very high and wide table in the center. This posed some challenges:

Today I stumbled across a pretty harmless-looking query in our application which turned out to be pretty harmful and...