Ruby has Enumerable.find(&block), which returns the first item in the collection for which the block evaluates to true.

When testing JavaScript functionality in Selenium (E2E), you may need to access a class or function inside of a evaluate...

Rails offers the fresh_when method to automatically compute an ETag from the given record, array of records or scope...

github.com

In moderately complex authorization scenarios you will often find yourself writing a map like this: class NotesController < ApplicationController power :notes...

...How to iterate over an Enumerable, returning the first truthy result of a block ("map-find...

To attach files to your records, you will need a new database column representing the filename of the file...

When Paperclip attachments should only be downloadable for selected users, there are three ways to go. The same applies to...

When you don't only have a favicon.ico in your project but also PNGs of different sizes and backgrounds, you...

You can not use the hash_including argument matcher with a nested hash: describe 'user' do let(:user) { {id: 1...

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

github.com

The parallel-gem is quite easy to use and can speed up rendering time if you want to render the...

Association named 'variations' was not found; perhaps you misspelled it? I just was hunting down a strange error with this...

Consul 0.10.0 now allows multiple power mappings for nested resources. When using nested resources you probably want two power

If (for some reason that you don't want to ask yourself) you need to know all classes that define...

Frontend performance and user experience are orthogonal to feature development. If care is not taken, adding features usually degrades frontend...

tl;dr: Using has_many associations with a :through option can lead to lost or duplicate records. You should avoid...

Accessing pseudo elements via JavaScript or jQuery is often painful/impossible. However, accessing their styles is fairly simple. Using getComputedStyle

Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is...

Embedding videos on a website is very easy, add a tag to your source code and it just works...

github.com

For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra...

makandra dev

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

This card explains how to generate an entity relationship diagram for your Rails application. We also show how to limit...

Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a...

This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process...