Since Rails 7 you are able to encrypt database information with Active Record. Using Active Record Encryption will store an...

Jasmine specs for the frontend often need some DOM elements to work with. Because creating them is such a common...

blog.logrocket.com

Variable fonts are popular for two reasons: they expand design possibilities and improve website performance. While the former statement is...

Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...

For Rails models where only one of multiple attributes may be filled out at the same time, there is no...

paweldabrowski.com

The linked content includes a few design patterns implemented with Ruby on Rails. What is the card indented to achieve...

You can use the code below to check whether the browser can make connections to the current site: await isOnline...

tl;dr You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details

Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...

The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served...

makandra dev
stackoverflow.com

Modern versions of Capybara include a finder method #ancestor which allows you to find a parental element using CSS or...

A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...

makandra dev

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

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

simple-form-bootstrap.plataformatec.com.br

Good reference how to build bootstrap forms with simple_form.