afal-concerns
OfficialReusable Rails concerns for AFAL apps
Software Engineering#rails#auditable#multitenancy#concerns#active_support_concern#owned_by_organization#evidenceable
AuthorGrupo-AFAL
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Reduce duplicated model logic and ensure consistent multi-tenant scoping, audit trails, and evidence attachments by guiding developers to extract cohesive behavior into well-structured ActiveSupport::Concerns that integrate with the AFAL stack.
Core Features & Use Cases
- Guidance on standard concern anatomy (included block, class_methods, instance methods) and composition order.
- Implementation patterns and examples for OwnedByOrganization, Auditable, and Evidenceable concerns including required associations and migrations.
- Best practices for state-as-separate-records, callback ordering, polymorphic associations, Pundit integration, performance considerations, and testing concerns in isolation with Minitest shared examples.
- Migration and database recommendations (foreign keys, indexes, counter caches) and integration notes for Current.user/Current.organization usage.
Quick Start
Create a new concern file under app/models/concerns using ActiveSupport::Concern, document the needed migrations and tests, include the concern in the target model, and verify scoping and audit behavior in integration tests.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: afal-concerns Download link: https://github.com/Grupo-AFAL/claude-plugins/archive/main.zip#afal-concerns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.