Rails partials have a lot of "hidden" features and this card describes some non-obvious usages of Rails Partials.
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...
The owner of a scheduled CI/CD pipeline in GitLab will always be notified if the pipeline fails. Follow these steps...
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...
The linked content includes a few design patterns implemented with Ruby on Rails. What is the card indented to achieve...
While working on a Rails application, your code base will grow a collection of different file types including: Ruby (business...
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...
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...
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...