If you ever need to restore exact records from one database to another, Marshal might come in handy. Marshal.dump is...
The sprintf method has a reference by name format option: sprintf("% d : % f", { :foo => 1, :bar => 2 }) # => 1 : 2.000000
While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic...
Given you have an array column like this: create_table "users", force: :cascade do |t| t.integer "movie_ids", default: [], array...
Legt man im DNS beispielsweise einen CNAME-Eintrag an, sollte das Ziel am Ende einen Punkt haben, also z.b. d31337.cloudfront.net...
Besides Plotting graphs in Ruby with Gruff, which comes handy for many uses cases, you sometimes might need configuration for...
Both knapsack and parallel_tests have the option to split groups by historic execution time. The required logs for this...
For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra...
The git doc states on the difference of these two commands: git-restore[1] is about restoring files in the...
There are multiple ways to redirect URLs to a different URL in Rails, and they differ in small but important...
Sometimes you'll find yourself with a set of tasks that require similar code for different models. For example, if...
Splitting up commits makes the process of reviewing often easier, since you can create several merge requests or review every...
It is possible to manipulate the forwarded ports of an established interactive SSH session. This is done by opening the...
Within Capybara you most certainly use the #check- and #uncheck-method to (un)check checkboxes. But there's one problem...
Looking at the source code of the validates_numericality_of validator, it becomes clear that it converts the attribute in...
When you allow file uploads in your app, a user might upload content that hurts other users. Our primary concern...
In Ruby on Rails ActiveRecord::Relation#merge overwrites existing conditions on the same column. This may cause the relation to...
I found the linked article very helpful to refresh my understanding of database indexes. As a small bonus, it includes...
Let's say we have posts with an attribute title that is mandatory. Our example feature request is to tag...
Rails Active Support provides some helpful methods for calculating times and dates, like Duration#ago or Duration#from...
Rails offers the fresh_when method to automatically compute an ETag from the given record, array of records or scope...
By activating strict_loading you force developers to address n+1 queries by preloading all associations used in the index...
We will achieve this by creating a block accepting method to optionally create and then lock a .lock File of...
In dieser Card machst du einige Übungsaufgaben um Linux Server mit Ansible zu verwalten. Da es vermutlich zu aufwendig ist...