Skip to main content
Jeden Skill in Manus ausführen
mit einem Klick

activerecord-patterns

Sterne21
Forks2
Aktualisiert1. Juni 2026 um 18:03

Idiomatic ActiveRecord patterns for Ruby on Rails — associations (belongs_to/has_many/has_one/has_many :through), counter_cache, polymorphic, STI vs delegated_type, scopes vs class methods, callbacks vs after_commit, find vs find_by vs where.first, includes vs preload vs eager_load, pluck vs select, exists? vs any?, batch processing with find_each, and fat-models-with-concerns. Use whenever the user writes or reviews ActiveRecord models, asks why a Rails query is slow or wrong, mentions includes/preload/eager_load, says "callback", references scopes, or is generating model code. Also use proactively when reading any Rails model file (app/models/*.rb).

Installation

Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.

Datei-Explorer
5 Dateien
SKILL.md
readonly