rails-37-style-core-rails-models
CommunityRails models: Concerns, state, POROs.
AuthorChwistophe
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a structured approach to building robust and maintainable Rails models, emphasizing clear separation of concerns, effective state management, and idiomatic Ruby patterns.
Core Features & Use Cases
- Composable Concerns: Organize model behavior into reusable, self-contained modules.
- State as Records: Manage discrete states (e.g., closed, golden) using dedicated database records for better tracking and querying.
- PORO Patterns: Utilize Plain Old Ruby Objects for presentation logic, complex operations, and view context bundling.
- Contextual Defaults: Employ
default: -> {}for setting associations and attributes. - Request Context: Leverage
ActiveSupport::CurrentAttributesfor global request context. - Use Case: When designing a new feature for a task management application, use concerns to add functionalities like
Assignable,Watchable, andCommentableto theTaskmodel, ensuring each piece of behavior is isolated and testable.
Quick Start
Apply the Closeable concern to the Card model to manage its closed state.
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: rails-37-style-core-rails-models Download link: https://github.com/Chwistophe/agent-skills-unofficial-37-signals-rails-way-fizzy/archive/main.zip#rails-37-style-core-rails-models 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.