Since Rails 5, domain models inherit from ApplicationRecord by default. This is the place to put code that should be...
Rails supports time zones, but there are several pitfalls. Most importantly because Time.now and Time.current are completely different things and...
Ubuntu might create several keyrings for you. Note that keyring passwords are initially set to the user password but do...
This card will show you how to use git rebase --onto without confusion. Use case: You've got two feature...
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.
Database connections are not thread-safe. That's why ActiveRecord uses a separate database connection for each thread.
This card compares patterns to store trees in a relation database like MySQL or PostgreSQL. Implementation examples are for the...
The parallel-gem is quite easy to use and can speed up rendering time if you want to render the...
RubyMine allows bookmarking lines of code. This is super-helpful when working on a complex problem. I've been using...
For the initial setup or changes in the sentry reporting it might be useful to enabled reporting of sentry in...
You can start vim with a read-only option. This prevents making accidentally changes in files you don't want...
Note: The behaviour of Spreewald's within step is as described below for version < 1.9.0; For Spreewald >= 1.9.0 it is...
Barby is a great Ruby gem to generate barcodes of all different sorts. It includes support for QR codes via...
This is a visualization of the files that will be generated by some useful rails generators. Invoke a generator from...
There are various ways to run external commands from within Ruby, but the most powerful ones are Open3.capture3 and Open3.popen3...
Sometimes your code has long lines: describe 'foo' do describe 'bar' do really_long_line_really_long_line_really_long...
A collection of code snippets which return a boolean value for a regex comparison. regexp.match?(string) # Recommended for Ruby >= 2.4...
There seems to be a nasty bug in Chrome 56 when testing with Selenium and Capybara: Slashes are not written...
Adding a gem means you take over the liability towards the external code. Checklist Based on "To gem, or not...
If you have a replication error with MySQL and you know the "error" is okay (e.g. you've executed the...
This error message may occur when rspec gets loaded by rake, e.g. when you migrate the test database. NoMethodError: undefined...
Reminder of what you can do with Geordi. Note: If you alias Geordi to something short like g, running commands...
First find the reference for the entry you want through looking at the stash: $ git stash list stash@{0}: WIP...