Tod is a gem for working with daytimes. That's a tuple of (hour, minute second) without a day, month...
To avoid multiple versions of a package, you can manually maintain a resolutions section in your package.json. We recommend you...
When doing some meta-programming magic and you want to do something for all attributes of a class, you may...
This is a short overview of things that are required to upgrade a project from the Asset Pipeline to Webpacker...
Rails' ActiveSupport::TimeWithZone objects have both a timezone code and offset, e.g. Thu, 28 Mar 2019 16:00:00 CET...
min-width is known as a CSS property that can be set to define a least width for an element...
When you have a powerful machine with many CPU cores, you might run into an error like
You can use .ids on an ActiveRecord scope to pluck all the ids of the relation: # Modern Rails User.where("users.name...
Webpacker is Rails' way of integrating Webpack, and version 4 has been released just a few days ago, allowing us...
Rails' params hash contains any request parameters (URL parameters or request payload) as well as routing parameters like :controller, :action...
Class-level process definitions are only applied to the original file Versions are generated based on the processed original file...
See the attached link for a useful overview of modern (and classic) DOM API methods, like matches, contains, append, cssText...
For searching in large database tables we usually use PostgreSQL's fulltext search capabilities. While this works reasonably well for...
This is a presentation from 2019-01-21. Summary We want to move away from jQuery in future projects
When restoring a PostgreSQL dump using pg_restore, you usually add the --clean flag to remove any existing data from...
To remove all tables from a database (but keep the database itself), you have two options. Option 1: Drop the...
Suggested Workflow Set the ruby version in .ruby-version to 2.3.5, then perform these steps one by one, fixing errors...
To reload a single-item association in Rails 5+, call #reload_ : post.reload_author In older Railses you can say
Cucumber factory supports polymorphic associations out of the box. Just keep in mind that you need to use named associations...
When upgrading Rails versions -- especially major versions -- you will run into a lot of unique issues, depending on the exact...
When projects run for many years, they require special regular maintenance to stay fresh. This kind of maintenance is usually...
Accessing pseudo elements via JavaScript or jQuery is often painful/impossible. However, accessing their styles is fairly simple. Using getComputedStyle
jQuery's removeClass removes the given class string from an element collection. If you want to remove multiple/unknown classes matching...
This repository was created with the intention of helping developers master their concepts in JavaScript. It is not a requirement...