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...
Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...
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 let's you chain a matcher with .or. The expectation will then pass if at least one matcher matches...
There is a kinda secret, yet well supported CSS feature called currentColor. It's like a special CSS variable that...
A matcher is a function that returns an object with a compare key. Usually it is registered with beforeEach...
TL;DR Append your locale keys with _html to have them marked as html_safe and translate them with = t...
Using the JS fullscreen API is painful because all browers use different methods and events and you need to use...
There are two ways within systemd to manage the fact that you need the gluster service active before mounting the...
You know that you can use jQuery's text() to get an element's contents without any tags.
If your rails application is unable to send mails, it might be useful to debug your settings using the rails...
When you have a large PG database, you may want to find out which tables are consuming the most disk...
Webpacker uses Babel and Webpack to transpile modern JavaScript down to EcmaScript 5. Depending on what browser a project needs...
CarrierWave comes with some RSpec matchers which will make testing more comfortable. Let's say you have an Uploader like...
Recent Bundler (1.16.1) started complaining about missing dependencies in the Gemfile. This is due to a stricter handling of specifications...
When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself.