Basic validations Read the Rails Guide on ActiveRecord Validations. You should have an overview which kinds of validations are built...
Within development and test environments, Rails is usually configured to show a detailed debug page instead of 404s. However, there...
This RailsCast demonstrated a very convenient method to activate VCR for a spec by simply tagging it with :vcr.
Debugging in CSS means figuring out what might be the problem when you have unexpected layout results. We’ll look...
The gem better_errors offers a detailed error page with an interactive REPL for better debugging. I had the issue...
Event delegation is a pattern where a container element has a single event listener that handles events for all descendants...
Sometimes a link or input field has no visible label. E.g. a text field with a magnifying glass icon 🔎 and...
Besides their default styling properties, HTML elements have a semantic meaning. For example, an h1 tag is usually styled with...
Most browsers have built-in drag and drop support for different page elements like text and images. While this may...
Ruby lets you re-use existing RegExp objects by interpolating it into new patterns: locales_pattern = /de|en|fr|es/i...
The RSpec matcher tests if two HTML fragments are equivalent. Equivalency means: Whitespace is ignored Types of attribute quotes are...
If you have fzf installed, you may add an alias such as this to your ~/.bashrc: alias recent-branch="git...
We are using Spring in our tests for sequential test execution but not for parallel test execution. And Rails requires...
With cd .. you can navigate one directory up from the one you are at now. If you use that a...
The tree command will show you the contents of a directory and all its sub directories as a tree:
There is an option you can set so that when using the cd command, small typos are automatically corrected. Add...
age is a simple, modern and secure file encryption tool, format, and Go library. It features small explicit keys, no...
Rails has the handy controller method send_file which lets us download files easily. We can decide whether the file...
It is generally discouraged to load your JavaScript by a tag in the : The reason is that a tag will pause the DOM parser until the script has loaded and executed. This will delay the browser's first contentful paint. A much better default is to load your scripts with a tag: A deferred script has many...
This bookmarklet grabs a PivotalTracker story title, transforms it into a valid git branch name and automatically prepends your initials...
The attached compiler() function below applies JavaScript behavior to matching HTML elements as they enter the DOM. This works like...
Often people need links which are not linked directly, but should trigger execution of JavaScript. ❌ Bad workarounds
The linked article provides a description of commonly found problems with TLS and hints on debugging / solving them.
tl;dr: Avoid to memoize methods with default (keyword) arguments! When you are using Memoized with default arguments or default...