github.com

For Sidekiq to be able to retry your jobs it has to be able to catch errors that occur while...

A JavaScript error in an E2E test with Selenium will not cause your test to fail. This may cause you...

If validations failed for a record, and you want to find out if a specific validation failed, you can leverage...

plnkr.co

Flexbox is awesome. Most of it even works in IE11, but flex: 1 won't work reliably in Internet Explorer...

Let's say you have a gem which has the following module: # within the imaginary super gem module SuperClient

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...

Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...

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

makandra dev

Option 1: JSON dump In config/webpack/environment.js you can get inspect environment which includes all webpack config options set for 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...

Background information about session storage in Rails Rails has a default mechanism to store the session in the CookieStore. This...

If you want to fill in textareas with multiple lines of text (containing line breaks / new lines) you can use...

If possible your code should detect features, not browsers. But sometimes you just need to sniff the browser. And when...

On some machines, installing Ruby 1.8.7 with ruby-build can lead to this error: math.c:37:13: error: missing binary...

Rails defines a #truncate helper as well as a method String#truncate. = truncate("my string", length: 5) = "my string".truncate...

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...

To catch all possible exceptions from a network call, we need to rescue many error classes like this: rescue SocketError...

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...

rspec.info

RSpec let's you chain a matcher with .or. The expectation will then pass if at least one matcher matches...

Just like Ruby Gems tag their version releases to the corresponding Git commit, it can be helpful to track production...