joshmcarthur.com

I recently wanted to add a model for address information but also wanted to add a unique index to those...

blog.saeloun.com

Imagine these models and associations: class Deck < ApplicationRecord has_many :cards end class Card < ApplicationRecord belongs_to :deck, optional: true...

It might sometimes be useful to check whether your Rails application accesses the file system unnecessarily, for example if your...

Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...

There is a way to use multiple databases in Rails. You may have asked yourself how you're able to...

tl;dr You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details

You can use Unpoly's up.on with a named listener function and immediately unbind this event listener with { once: true...

If you're using many terraform root modules in a repository, downloading common providers like the AWS one can quickly...

tl;dr: Use the URLSearchParams API to make your live easier if you want to get or manipulate query parameters...

Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...

RSpec's let allows you to super into "outside" definitions, in parent contexts. Example: describe '#save' do subject { described_class.new(attributes...

DevOps Curriculum

Wir wollen verstehen, welche Hardware-Ressourcen uns zur Verfügung stehen und wie wir mögliche Engpässe und Probleme identifizieren können. Grundsätzlich...

DevOps Curriculum

Schau dir den unter Inhalte verlinkten Udemy Kurs an. Die Zugangsdaten für Udemy bekommst Du von deinem Mentor. Überspring Inhalte...

DevOps Curriculum

Wir arbeiten bei makandra alle auf Linux-Betriebssystemen und bedienen im DevOps- & Cloud-Bereich primär Kunden, die ebenfalls auf Linux...

Sometimes we write plain SQL queries in migrations so we don't have to mock ActiveRecord classes. These two migrations...

Jasmine is a great tool to unit test your JavaScript components without writing an expensive end-to-end test for...

Resources RubyGuides: Mastering Ruby Regular Expressions Using regular expressions in JavaScript Testing regular expressions visually Regular Expressions: Quantifier modes...

Learn to create test data effectively using factories. Decouple tests by having each test start with an empty database...

JavaScript code can access and manipulate the browser's DOM tree. Using JavaScript we can add interactive behavior to our...

Since Rails 6.1, if we use where.not with multiple attributes, it applies logical NAND (NOT(A) OR NOT(B)) instead...

dev.to

In my case [...] the catalog is an XML that contains all kinds of possible products, categories and vendors and it...

TL;DR When using Cache-Control on a Rails application, make sure the Vary: Accept header is set.

makandra dev

Field error steps Spreewald's The...

...field should have an error and The...

...field should have the error...

...steps now...

The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served...