SimpleForm comes with an option browser_validations which could be used to give fields that have a presence validation the...

RSpec examples can get quite long, especially in feature specs. This makes them hard to read & understand. Also, when executing...

ActiveRecord computes table names of model classes, and results are usually just like you'd expect. Adding a prefix for...

Modern CSS offers the field-sizing property to allow elements to automatically adjust size (width and/or height) to fit their...

docs.sentry.io

You can report CSP violations to Sentry. Within config/initializers/content_security_policy.rb: Rails.application.configure do config.content_security_policy do |policy| # Settings for the policy...

We usually ship applications that self-host webfonts to comply with GDPR. Many popular web fonts are available as NPM...

Interactively rebase your current branch onto main, keeping the original base commit (i.e. not rebasing onto main directly).

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

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

The key to unlocking the full potential of LLMs in coding lies in crafting precise prompts. The main challenge is...

Using ffmpeg, you can easily re-encode a video to reduce its file size. Command Do it like this:

Hint If you are using our opscomplete.com hosting we can set all environment variables mentioned below for your deployment on...

In Slack, the settings dialog only offers a fixed selection of fonts. You can use any font you like using...

TL;DR: Rails ships two methods to convert strings to constants, constantize and safe_constantize. Neither is safe for untrusted...

makandra dev

YJIT is Ruby's default just-in-time compiler. It is considered production-ready since Ruby 3.2 (source).

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

stevenhicks.me

Sometimes you want to write a test for a business rule that's based on multiple variables. In your goal...

makandra dev
github.com

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

What is makandra cards? We are makandra, a team of 60 web developers, DevOps and UI/UX experts from Augsburg, Germany...

makandra dev

There are two ways a logout in SAML can happen: Service Provider (SP) initiated and Identity Provider (IDP) initiated logout...

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

If you need to make an HTTPS connection to a host which uses an expired certificate, do not disable certificate...