Code Explainers

Code explainers tagged #namespacing

ruby
module Api
  module Reports
    class DailyOrderTotalsController < Api::BaseController
      def index

Building a daily order totals report in Rails

sql aggregation json api query building
Intermediate 7 steps
typescript
type StorageSchema = Record<string, unknown>;
 
interface StorageOptions {
  namespace?: string;

A type-safe wrapper around localStorage

generics type-safety serialization
Intermediate 9 steps
ruby
module Api
  module V2
    class ArticlesController < Api::BaseController
      before_action :set_article, only: %i[show update destroy]

Building a versioned JSON API controller in Rails

rest-api serialization pagination
Intermediate 10 steps