ruby-rails

Apply idiomatic Rails patterns for models, migrations, controllers, and background jobs.

16|9|Updated Nov 6, 2013
One-click install
npx skills add https://github.com/erikstmartin/dotfiles --skill ruby-rails-erikstmartin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ruby-rails
Source: https://github.com/erikstmartin/dotfiles/tree/main/skills/catalog/ruby/ruby-rails
Command: npx skills add https://github.com/erikstmartin/dotfiles --skill ruby-rails-erikstmartin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines idiomatic Rails development by consolidating conventions, patterns, and best practices for data models, migrations, controllers, background jobs, and caching.

Core Features & Use Cases

  • ActiveRecord-centric modeling: associations, validations, scopes, and migrations.
  • Controller discipline: thin controllers, strong params, and clean action composition.
  • Background processing and caching: idempotent jobs, caching strategies, and production-ready patterns.
  • Testing and maintenance: guidance for RSpec/Minitest, factories, and CI-friendly workflows.

Quick Start

Start by scaffolding a Rails app following conventional patterns to establish models, controllers, and jobs.

Frequently Asked Questions about ruby-rails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure ActiveRecord associations and scopes in Rails?

Idiomatic Rails enforces ActiveRecord conventions for associations, validations, and scopes to ensure maintainable data models. It applies robust indexing practices and clean query composition for production-ready relational mapping.

What is the best way to write idempotent background jobs in Rails?

Idempotent Rails background jobs require production-ready patterns that safely handle retries and failures. This approach enforces safe processing conventions to ensure scheduled tasks remain reliable and maintainable under load.

How do I keep Rails controllers thin using strong parameters?

Thin Rails controllers use strong parameters and clean action composition to handle request flow. This pattern enforces controller discipline by delegating business logic to models and background jobs.

Does this Rails pattern set work for large monoliths and APIs?

Yes, these Rails conventions apply to small services through large monoliths and APIs. The patterns cover Hotwire, caching, and testing strategies that scale reliably across different application sizes.

What testing strategies should I use for Rails migrations and models?

Reliable Rails testing uses RSpec or Minitest with factories to validate migrations and models. It enforces CI-friendly workflows and robust testing strategies to ensure maintainable, production-ready application code.