controller

Generate thin RESTful Rails controllers with TDD and Pundit authorization.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/reckerswartz/resume_builder --skill controller-reckerswartz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: controller
Source: https://github.com/reckerswartz/resume_builder/tree/main/.devin/skills/controller
Command: npx skills add https://github.com/reckerswartz/resume_builder --skill controller-reckerswartz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates thin, RESTful Rails controllers with a test-driven workflow, ensuring proper authorization, strong parameters, Turbo streams support, and clean separation between controllers and business logic.

Core Features & Use Cases

  • Thin controllers that delegate business logic to services.
  • RESTful actions: index, show, new, create, edit, update, destroy.
  • Pundit authorization and policy_scope integration.
  • Turbo Stream responses and progressive enhancement considerations.
  • Request specs-first TDD workflow with clear guidance.
  • Error handling and robust boundary checks.

Quick Start

Provide the ResourceName and desired actions, and the skill will scaffold a thin RESTful Rails controller with request specs following a TDD workflow.

Frequently Asked Questions about controller

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

FAQPage Schema
How do I create thin Rails controllers that keep business logic separated?

To create thin Rails controllers, you delegate business logic to service objects and enforce strong parameters with Pundit authorization. This approach ensures controllers handle only HTTP concerns, routing, and policy checks.

What is the best way to test Rails controllers with a TDD workflow?

The best way to test Rails controllers with TDD is using a request-spec-first approach. You write request specs to validate RESTful routes, strong parameters, and Pundit policy enforcement before implementing the controller actions.

Does this Rails controller approach work with Turbo Streams?

Yes, this Rails controller approach works with Turbo Streams by generating responses that support progressive enhancement. Controllers scaffolded this way handle Turbo Stream formats alongside standard RESTful actions.

Can I use Pundit authorization for RESTful controller actions in Rails?

Yes, you can use Pundit authorization for RESTful controller actions in Rails. The controller integrates Pundit policies and policy_scope to enforce permissions across index, show, new, create, edit, update, and destroy actions.

How do I scaffold RESTful Rails controllers with strong parameters and error handling?

You scaffold RESTful Rails controllers by providing a resource name and desired actions. The process enforces strong parameters, robust boundary checks, and error handling while maintaining a clear separation of concerns.

When should I not use thin controllers for my Rails application?

You should not use thin controllers when your application lacks RESTful routes or does not separate business logic into services. Thin controllers require delegating complex operations to service objects and policy-based authorization to function effectively.