A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...
Basic validations Read the Rails Guide on ActiveRecord Validations. You should have an overview which kinds of validations are built...
Besides their default styling properties, HTML elements have a semantic meaning. For example, an h1 tag is usually styled with...
Rails has the handy controller method send_file which lets us download files easily. We can decide whether the file...
Formerly 301 (Moved Permanently) and 302 (Found) were used for redirecting. Browsers did implement them in different ways, so since...
Matching the "space" character class For matching whitespaces in a regular expression, the most common and best-known shorthand expression...
To attach files to your records, you will need a new database column representing the filename of the file...
CarrierWave comes with a set of default configuration options which make sense in most cases. However, you should review these...
Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...
Consider the following models and form models: class Parent < ApplicationRecord has_many :children, class_name: 'Child', foreign_key: 'parent_id...
Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...
The Truemail gem (not to be confused with truemail.io) allows validating email addresses, e.g. when users enter them into a...
TinyMCE is a WYSIWYG editor which is quite customizable. Add a custom button to the tinyMCE toolbar and tell tinyMCE...
Good reference how to build bootstrap forms with simple_form.
CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...
Speaker today is Henning Koch, Head of Development at makandra. This talk will be in German with English slides.
Test-Driven Development (TDD) in its most dogmatic form (red-green-refactor in micro-iterations) can be tedious. It does...
When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...
Turns out, Cucumber::MultilineArgument::DataTable#diff! caches some stuff. Code of the following form will not work as intended:
By default, Devise redirects to a sign-in form when accessing a route that requires authentication. If for some reason...
Or: How to avoid and refactor spaghetti code Please note that I tried to keep the examples small. The effects...
This is a personal post-mortem analysis of a project that was mainly build to provide a REST API to...
There is a kind of features in web applications that hinder automated integration tests. Examples include cookie consent banners or...
Rails uses a CSRF token in forms and AJAX requests to verify a user request. Internally it compares the injected...