What problem does it solve?
This Skill eliminates the frequent issue of bloated Rails models, misplaced multi-model form logic, unreadable complex queries, and view files cluttered with procedural formatting code that AI coding agents often misplace or over-extract.
Core Features & Use Cases
- Form Objects: Handle multi-model form submissions (e.g., signup flows that create User, Account, and Subscription records) and non-ActiveRecord validations without polluting model classes.
- Query Objects: Encapsulate complex, reusable ActiveRecord queries with 10+ lines of chained scopes, filters, and sorting logic for consistent reuse across controllers.
- Presenters / Decorators: Move view-specific formatting and display logic out of models and views to keep both clean, testable, and focused on their core responsibilities.
- Use Case: If your Rails app has a signup flow spanning 3 models, a user search with 6 filter options, and user profile views with 80 lines of conditional formatting, this Skill guides you to apply the right pattern for each scenario without over-engineering.
Quick Start
Ask your AI coding agent to refactor your multi-model signup form into a form object using ActiveModel::Model with transaction wrapping and custom validations, extract your complex filtered user search into a reusable query object, and move all user view formatting logic into a dedicated presenter class to eliminate bloat across your Rails codebase.