Rails has the handy controller method send_file which lets us download files easily. We can decide whether the file...

en.wikipedia.org

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

getbootstrap.com

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

makandra dev

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

github.com

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

makandra dev

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

This collection contains some useful design resources for developers. Many of them were mentioned in the Refactoring UI tutorials.

makandra dev

CSS transitions are a simple animation framework that is built right into browsers. No need for Javascript here. They're...

When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...