tl;dr Prefer request specs over end-to-end tests (Capybara) to joyfully test file downloads! Why? Testing file downloads

You can chain multiple Capybara matchers on the page or any element: expect(page) .to have_content('Example Course')

The Web Animations API has great browser support, and you should be using it to animate DOM elements from JavaScript...

Today I stumbled across a pretty harmless-looking query in our application which turned out to be pretty harmful and...

Any form fields where users enter numbers should be an . Numeric inputs have several benefits over : On mobile or tablet...

tl;dr We recommend configuring Selenium's unhandled prompt behavior to "ignore". When running tests in a real browser, we...

A Rails script lives in lib/scripts and is run with bin/rails runner lib/scripts/.... They are a simple tool to perform...

You can use the config.x configuration in combination with config_for to configure global settings for your Rails 4.2+ application...

You can ignore certain commits when using git blame with the --ignore-revs-file option. This is handy to ignore...

Getting an entire test suite green can be a tedious task which involves frequent switches between the CLI that is...

In the Gitlab settings the flag Auto-cancel redundant pipelines is enabled by default. This auto-cancels jobs that have...

#pluck is commonly used as a performant way to retain single database values from an ActiveRecord::Relation Book.pluck(:title, :price...

Every modern Rails app should have a Content Security Policy enabled. Very compatible default The following "default" is a minimal...

All direct child directories of app are automatically added to the eager- and autoload paths. They do NOT create a...

TLDR Using .includes or .eager_load with 1-n associations is dangerous. Always use .preload instead. Consider the following ActiveRecord...

Given you have an array column like this: create_table "users", force: :cascade do |t| t.integer "movie_ids", default: [], array...

We regularly have tasks that need to be performed around a deploy. Be it to notify operations about changed application...

Both knapsack and parallel_tests have the option to split groups by historic execution time. The required logs for this...

makandra dev

There are multiple ways to redirect URLs to a different URL in Rails, and they differ in small but important...

Rails' url_for is useful for generating routes from a Hash, but can lead to an open redirect vulnerability.

Rails' Strong Parameters enable you to allow only specific values from request params to e.g. avoid mass assignment.

An introduction to mangling When you minify ("compress", "optimize") your JavaScript for production, the names of your functions and variables...

TL;DR: Grid elements have min-width: auto in a 1fr column, which may lead to overflows. With minmax(0...

When you write your next CarrierWave uploader, consider processing your images with libvips instead of ImageMagick. Reasons for libvips