Every Rails response has a default ETag header. In theory this would enable caching for multiple requests to the same...

You have an async function that rejects: async function failingFunction() { throw new Error("Something went wrong") } When you call that...

To navigate between test and test subject Rubymine requires you to set the test root sources as Test Sources Root...

Haml 6 was a major rewrite with performance in mind. To achieve a performance improvement of 1.7x, some design...

Maintaining larger projects makes it more difficult to balance refactoring and upgrade tasks according to its actual value. Consider to...

By activating strict_loading you force developers to address n+1 queries by preloading all associations used in the index...

Testing your responses in Rails allows to parse the body depending on the response MIME type with parsed_body.

makandra dev

If you need a sample video with certain properties for a test you can create one using ffmpeg.

In the past we validate and set default values for boolean attributes in Rails and not the database itself.

Not all email clients support external images in all situations, e.g. an image within a link. In some cases, a...

Let's assume that we have a model Movie that registers a callback function when a new instance of Movie...

makandra dev

Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...

Usually, design development starts with drafts, sketches and prototypes. These are reviewed, refined and iterated until the final design is...

makandra dev

In a Jasmine spec you want to spy on a function that is imported by the code under test. This...

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

Jasmine specs that work with DOM elements often leave elements in the DOM after they're done. This will leak...

sass >= 1.35.0 has the option quietDeps and silenceDeprecations to silence deprecation warnings from dependencies. quietDeps: No deprecation warnings for dependencies...

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

Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name...

To allow HTTP 304 responses, Rails offers the fresh_when method for controllers. The most common way is to pass...

When changing code in mailers, updating the corresponding mailer preview can be forgotten very easily. Mailer previews can be tested...

Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...

While verifying doubles in RSpec is a good default, it is limited in the amount of methods it actually is...

There is a way to use multiple databases in Rails. You may have asked yourself how you're able to...