Geordi's cucumber command has a --rerun option that reruns failing tests the given number of times. Usage: geordi cucumber...

developer.mozilla.org

...HTML's accepts a single file. You can allow multiple files via . But sometimes, selecting multiple files is not enough...

web.archive.org

Restricting access to cookies is essential for security in many web apps. For example, the session ID, the secret token...

Most forms have a single submit button that will save the record when pressed. Sometimes a form needs additional submit...

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

At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads...

When you receive a ZIP file from a Windows user, umlauts and other non-latin1 characters in filenames may look...

Haml lets you prefix a group of attributes by wrapping them in a hash. This is only possible with the...

As a web developer, you know Google Analytics (GA). Probably you've dropped the GA snippet into more than one...

Why secure-only cookies used to be necessary Cookies have an optional secure flag. It tells the browser to not...

stackoverflow.com

Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...

Whenever is a Ruby gem that provides a nicer syntax for writing and deploying cron jobs. Leading zeros are important...

The method cookies is defined in the ActionController and should never be overwritten. Bad example class StaticPagesController < ApplicationController

When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...

Authentication is a special part of web applications. On the one hand, it usually is a crucial security mechanism restrict...

makandracards.com

In medium-sized to large Rails applications, asset compilation can take several minutes. In order to speed up deployment, asset...

guides.rubyonrails.org

TL;DR I18n keys ending with _html are automatically marked as HTML-safe when translating with t('.your_key_html...

When your application is running on a multi-server setup, application logs are stored per server (unless you choose a...

When your JavaScript bundle is so massive that you cannot load it all up front, I would recommend to load...

If your rails application is unable to send mails, it might be useful to debug your settings using the rails...

Webpacker uses Babel and Webpack to transpile modern JavaScript down to EcmaScript 5. Depending on what browser a project needs...

Lets say we have a user with a contract whereas contract is a mounted carrierwave file. Now we want to...

github.com

This might be a known issue with Rubygems 2.5.1. This will help: gem update --system

jsfiddle.net

When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself.