...yourself mixing in the same ETag inputs in all actions, you may also use a controller-wide etag {...
class UsersController < ApplicationController etag { current_user } # Mix the current user into...
config.before do # stuff that_fancy_method if is_a? Spec::Rails::Example::ControllerExampleGroup # more stuff end Find out if you are in a spec that knows about request...
Im Kapitel 502 Eine Applikation als Container mit CI pipelines deployen hast du eine Applikation auf AWS deployed. In diesem...
By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...
1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...
In diesem Kapitel lernst du die grundsätzlichen Konzepte von Kubernetes kennen. Hier geht es weniger um die API Objekte wie...
Du verstehst, was ein Pod ist und warum es Sinn macht, Container auf diese Weise zu gruppieren.
Debugging performance issues in your Rails app can be a tough challenge. To get more detailed insights consider using the...
When HTTP clients make an request they can define which response formats they can process. They do it by adding...
(Rails has a method ActiveRecord::Relation#merge that can merge ActiveRecord scopes. However, its behavior has never been clear, and...
While verifying doubles in RSpec is a good default, it is limited in the amount of methods it actually is...
Let's say we have posts with an attribute title that is mandatory. Our example feature request is to tag...
Angular 1.3+ has an alternative getter/setter pattern: You can bind ng-model to an accessor function. This is a function...
Or: How to avoid and refactor spaghetti code Please note that I tried to keep the examples small. The effects...
To use a form model with devise, you can simply override #resource_class in a controller. A typical use case...
When your controller action raises an unhandled exception, Rails will look at the exception's class and choose an appropriate...
In dieser Card geht es um Netzwerke in Kubernetes. Schau noch einmal kurz auf Netzwerke zurück und schau dir die...
There are multiple ways to redirect URLs to a different URL in Rails, and they differ in small but important...
By activating strict_loading you force developers to address n+1 queries by preloading all associations used in the index...
When delivering non-public uploaded files (images, documents etc), one has to decide whether and how to do authorization. The...
In this card we will learn to write code that scales with a large number of database records. We will...
Programatically invoke Rails generators Require the generator, instantiate it and invoke it (because generators are Thor::Groups, you need...
When your code does not behave as expected, you can use a debugger statement ("breakpoint") at any point in your...
Basic validations Read the Rails Guide on ActiveRecord Validations. You should have an overview which kinds of validations are built...