dhh-rails-style

Enforce DHH Rails conventions for RESTful models, thin controllers, and Minitest tests.

Updated Oct 12, 2024
One-click install
npx skills add https://github.com/samrocks03/shuttle-office-service --skill dhh-rails-style-samrocks03
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dhh-rails-style
Source: https://github.com/samrocks03/shuttle-office-service/tree/main/.agents/skills/dhh-rails-style
Command: npx skills add https://github.com/samrocks03/shuttle-office-service --skill dhh-rails-style-samrocks03

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The DHH Rails style provides a cohesive blueprint for building Rails apps by promoting RESTful design, fat models, thin controllers, and domain-oriented concerns. It consolidates patterns such as Current attributes, model concerns, and simple authorization into a single, readable standard to improve maintainability and onboarding. Typical use includes Rails API and web apps that require predictable architecture, tested with Minitest fixtures, and avoid external service dependencies.

Core Features & Use Cases

  • RESTful mapping and fat models with concerns to keep controllers lean.
  • Domain-driven patterns like Current attributes, state-as-record models, and lightweight authorization colocated with models.
  • Use cases include building maintainable Rails APIs or apps that require clear architecture and straightforward testing.

Quick Start

Start applying 37signals/DHH conventions to your Rails project by auditing controllers and models for RESTful mappings, adding necessary concerns, and adopting Current attributes for request-scoped state.

Frequently Asked Questions about dhh-rails-style

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

FAQPage Schema
How do I enforce DHH Rails conventions in my Ruby on Rails application?

DHH Rails style is a set of conventions promoting RESTful design, fat models, thin controllers, and domain-oriented concerns to provide a cohesive blueprint for building maintainable Rails applications with predictable architecture.

How do I structure Rails models using concerns and Current attributes?

DHH Rails style is a set of conventions promoting RESTful design, fat models, thin controllers, and domain-oriented concerns to provide a cohesive blueprint for building maintainable Rails applications with predictable architecture.

Can I use DHH Rails style conventions for Rails API apps tested with Minitest?

DHH Rails style is a set of conventions promoting RESTful design, fat models, thin controllers, and domain-oriented concerns to provide a cohesive blueprint for building maintainable Rails applications with predictable architecture.

What's the best way to keep Rails controllers thin while maintaining domain logic?

DHH Rails style is a set of conventions promoting RESTful design, fat models, thin controllers, and domain-oriented concerns to provide a cohesive blueprint for building maintainable Rails applications with predictable architecture.

Does the DHH Rails style approach require external service dependencies?

DHH Rails style is a set of conventions promoting RESTful design, fat models, thin controllers, and domain-oriented concerns to provide a cohesive blueprint for building maintainable Rails applications with predictable architecture.

When should I avoid using concerns-based architecture in Rails?

DHH Rails style is a set of conventions promoting RESTful design, fat models, thin controllers, and domain-oriented concerns to provide a cohesive blueprint for building maintainable Rails applications with predictable architecture.