If you want to get the path of a file relative to another, you can use the expand_path method...

CSS variables are very different from preprocessor variables. While preprocessors use variables to compile a static piece of CSS, CSS...

When you use Sentry to monitor exceptions, an important feature is Sentry's error grouping mechanism. It will aggregate similar...

Rails middlewares are small code pieces that wrap requests to the application. The first middleware gets passed the request, invokes...

If you want to prevent that two processes run some code at the same time you can use the gem...

We use Sentry to be informed about different kinds of issues. One of the key features is that you are...

"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...

If you have a :string or :text field, you should pair it with a model validation that restricts its length...

Here is an ES5 object literal with two string properties and a function property: let user = { firstName: 'Max', lastName: 'Muster...

makandra dev

RubyMine has a HTTP Client that can be useful to test web APIs. Just create a .http scratch file an...

When an event listener on a DOM element throws an error, that error will be silenced and not interrupt your...

tl;dr Don't forget require 'English' if you use a named global such as $LAST_MATCH_INFO. Otherwise this...

To make CSS rules dependent on the screen size, we use media queries: @media (max-width: 500px) { // rules for screen...

Ruby and Rails have several methods for creating a new object that looks like another: clone, dup, deep_dup. When...

When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...

We can use ActiveRecord's where to add conditions to a relation. But sometimes our condition is not on the...

makandra dev

Or: How to avoid and refactor spaghetti code Please note that I tried to keep the examples small. The effects...

This checklist should help you to check edge cases that are not part of the default Carrierwave configuration.

Debugging image color profiles is hard. You can't trust your eyes in this matter, as the image rendering depends...

Browsers come with a set of built-in elements like or . When we need a new component not covered by...

Install the latest bundler version: gem install bundler Fetching bundler-2.3.5.gem Successfully installed bundler-2.3.5 1 gem installed Update the bundler...

This is a bookmarklet you can add to Chrome or Firefox which will allow you to create a story in...

Capybara provides execute_script and evaluate_script to execute JavaScript code in a Selenium-controlled browser. This however is not...

Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...