rails-concern

Installation
SKILL.md

Rails Concern Generator (TDD)

Creates concerns (ActiveSupport::Concern modules) for shared behavior with specs first.

Quick Start

  1. Write failing spec testing the concern behavior
  2. Run spec to confirm RED
  3. Implement concern in app/models/concerns/ or app/controllers/concerns/
  4. Run spec to confirm GREEN

When to Use Concerns

Good use cases:

  • Shared validations across multiple models
  • Common scopes used by several models
  • Shared callbacks (e.g., UUID generation)
  • Controller authentication/authorization helpers
  • Pagination or filtering logic
Related skills
Installs
28
GitHub Stars
540
First Seen
Jan 23, 2026