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

blog.mastermind.dev

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

ruby-doc.org

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

This is a checklist I use to work on issues. For this purpose I extracted several cards related to the...

Rails partials have a lot of "hidden" features and this card describes some non-obvious usages of Rails Partials.

In the past we validate and set default values for boolean attributes in Rails and not the database itself.

Since Rails 7 you are able to encrypt database information with Active Record. Using Active Record Encryption will store an...

geekytidbits.com

To retrieve only unique combinations of the selected attributes: You can omit rows, where all selected columns are equal with...

Das Standardtool für Monitoring auf AWS ist Cloudwatch. Du hast dir in den AWS Kapiteln Cloudwatch sicherlich schon grundsätzlich angesehen...

DevOps Curriculum

Mit SQL spricht man mit relationalen Datenbanken. Ziele Verstehe die folgenden SQL Befehle SELECT WHERE ORDER INNER JOIN, LEFT JOIN...

When an object is created / updated, various callbacks are executed in this order: before_validation after_validation before_save

We had a strange behaviour on one of our mariadb-servers: Everyday at around midnight we saw that the root...

When changing glibc versions, it's possible to end up with corrupt indexes in PostgreSQL. Are My Indexes Affected?

When changing the glibc version, it's possible that the upgrade also includes changes to how locales work.

The Oracle mysql client has an odd behavior if your server uses latin1 as default character-set-server. Command

Erfülle die Aufgaben Zeige deinem Mentor in einer Live-Demo was du umgesetzt hast. Wenn du Aufgabe 4 betrachtest...

You might use screen or tmux to run a temporary command on a server which continues to run after the...