There seems to be no built-in matcher in RSpec to check if a string contains terms in the desired...

In this example we assume that not only the storage gem changes but also the file structure on disc.

github.com

Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...

github.com

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

makandra dev

Cross-Site Request Forgery (CSRF) is an attack pattern for websites. A CSRF attack is usually relevant in a...

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

makandra dev

Geordi provides a pretty neat way to generate beautiful commit messages according to your stories in Linear: geordi commit

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

If you use transactional_fixtures or the database_cleaner gem with strategy :transaction, after_commit callbacks will not be fired...

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

web.archive.org

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

Let's say you have a gem which has the following module: module SuperClient def self.foo 'Foo' end

keepachangelog.com

We want to keep a changelog for all gems we maintain. There are some good practices for writing a changelog...

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

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

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

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

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