An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...
Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...
Download the dictionary from http://www.winedt.org/dict.html, e.g. http://www.winedt.org/dict/de_neu.zip unzip de_neu.zip mkdir ~/Documents/dic iconv -f UTF-16 -t...
TL;DR: Bundler 2.0 will rename Gemfile to gems.rb and Gemfile.lock to gems.locked (sic). The old filenames will be supported...
RSpec allows defining methods inside describe/context blocks which will only exist inside them. However, classes (or any constants, for that...
There are several gems that make it easy to read and process xlsx files. Parsing the entire file at once...
Use return to return from a method. return accepts a value that will be the return value of the...
I frequently find myself needing a combination of group_by, count and sort for quick statistics. Here's a method...
Scope is all about where something is visible. It’s all about what (variables, constants, methods) is available to you...
You can use local copies of gems in your Gemfile like this: gem 'spreewald', path: '~/gems/spreewald' As soon as you...
In the ruby shell (IRB) and rails console the return value of the previous command is saved in _ (underscore). This...
I often see the use of || to set a default value for a variable that might be nil, null or...
ActiveRecord::RecordNotFound errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:
This card will show you a cool way to define a class using Struct.new. A common usecase for Structs are...
Nowadays it is fairly easy to intercept and modify mails globally before they are sent. All you have to do...
Rails supports time zones, but there are several pitfalls. Most importantly because Time.now and Time.current are completely different things and...
You can use gem list to list all gems available from a remote gem server: gem list -r --clear-sources...
Ruby's standard library is in the process of being gemified. It will soon - Ruby 2.5 - consist of RubyGems, which...
Middleman is a static page generator that brings many of the goodies that Rails developers are used to.
Dump this method into your Ruby console to quickly print data in columns. This is helpful for e.g. comparing attributes...
In case you want to require a gem, that is not in the Gemfile of you bundle and therefore not...
This card compares patterns to store trees in a relation database like MySQL or PostgreSQL. Implementation examples are for the...
Sass lets you easily specify multiple selectors at once like this: .some-block &.has-hover, &:hover outline: 1px solid red...
Barby is a great Ruby gem to generate barcodes of all different sorts. It includes support for QR codes via...