Code Explainers

Code explainers tagged #inheritance

typescript
import {
  CACHE_MANAGER,
  CacheInterceptor,
} from '@nestjs/cache-manager';

A tenant-aware HTTP cache in NestJS

caching interceptors multi-tenancy
Intermediate 7 steps
ruby
class Employee < ApplicationRecord
  validates :name, presence: true
  validates :salary, numericality: { greater_than: 0 }
 

How STI models share behavior in Rails

single-table-inheritance inheritance method-overriding
Intermediate 8 steps