In Rails, the implicit_order_column (added in Rails 6) is a configuration option that helps you define the default...
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...
I have moved away from creating fixture elements using CSS selectors. While CSS can be very concise, it can be...
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...
There are several ways to run a single spec. I usually copy the spec file path with the line number...
The key to unlocking the full potential of LLMs in coding lies in crafting precise prompts. The main challenge is...
Ubuntu 24 added some guarding for Python packages which no longer allows installing applications through pip on system level. Instead...
Rails wraps your parameters into an interface called StrongParameters. In most cases, your form submits your data in a nested...
The new params.expect method in Rails 8 improves parameter filtering, addressing issues with malformed input and enhancing security. It provides...
To reverse lookup a fixture by its table name and id, use the following approach on ActiveRecord::FixtureSet: table = 'users...
Your package-lock.json should always match and resolve all packages from your package.json. Coming from Yarn, I was looking for an...
Text fragments allow linking directly to a specific portion of text in a web document, without requiring the author to...
I noticed that tig 2.5.1 that is provided by Ubuntu 22.04 repositories has inferior bash completion than older versions after...
On our Ubuntu machines we have nautilus file manager with nautilus-extension-gnome-terminal installed. This adds an entry to...
Rails' default logger prefixes each log entry with timestamp and tags (like request ID). For multi-line entries, only the...
Recently I needed to benchmark an Active Record query for performance measurements. I wrote a small script that runs each...
sudo gitlab-rails console Note This takes some minutes to start Send a mail Use the following...
tl;dr To adjust code templates in RubyMine, navigate to Settings -> Editor -> File and Code Templates. Example You can navigate...
While most Rails Apps are tied to at least one external REST API, machine-to-machine communication via GraphQL is...
Add apt source: apt update -y && apt install -y gpg sudo wget curl sudo install -dm 755 /etc/apt/keyrings
As we're switching from PT to Linear, I've updated the existing bash script to work for commits that...
If you want to use rsync to transfer files that don't belong to your user to another system you...