Skip to content

Instantly share code, notes, and snippets.

View OrestF's full-sized avatar
🏠
Working from home

Orest Falchuk OrestF

🏠
Working from home
View GitHub Profile
@OrestF
OrestF / scopable.rb
Last active February 15, 2025 07:26
Scopable.rb + Sortable.rb
# frozen_string_literal: true
module Scopable
extend ActiveSupport::Concern
GTE_LTE_COLUMN_TYPES = %i[integer float decimal datetime date time].freeze
SEARCHABLE_COLUMN_TYPES = %i[string text integer float decimal datetime date time].freeze
MATCHABLE_COLUMN_TYPES = %i[string text].freeze
SCOPABLE_COLUMN_TYPES = GTE_LTE_COLUMN_TYPES + SEARCHABLE_COLUMN_TYPES + MATCHABLE_COLUMN_TYPES
EXCLUDED_ASSOCIATION_SCOPES_CLASSES = %w[ActiveStorage::Attachment ActiveStorage::Blob].freeze
@OrestF
OrestF / abdi.md
Created June 18, 2024 09:25
ABDI - architecture

ABDI - App Business Data Infrastructure

Description

This is an overview of advanced rails architecture inspired by various patterns and frameworks like Domain Driven Design, Repository patterns, Trailblazer, Dry.rb and others.

Key concepts

Everything revolves around 4 nodes: App, Business, Data, Infrastructure. Each node has certain responsibilities that must be not used by other nodes.