action-controller

Guides Rails developers in building controllers with RESTful actions, filters, and error handling.

3|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/bastos/ruby-plugin-marketplace --skill action-controller
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: action-controller
Source: https://github.com/bastos/ruby-plugin-marketplace/tree/main/plugins/ruby-on-rails/skills/action-controller
Command: npx skills add https://github.com/bastos/ruby-plugin-marketplace --skill action-controller

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Guides developers on building Rails controllers to manage requests, responses, and routing in a consistent, secure way.

Core Features & Use Cases

  • Patterns for RESTful actions, filters, and strong parameters to ensure predictable behavior.
  • Rendering strategies, redirects, API controller patterns, and error handling, with authentication hooks.
  • Guidance on composing controllers with concerns, services, and query objects for maintainable code.

Quick Start

Create a new controller following Rails conventions and apply before_action filters and strong params as shown in the examples.

Frequently Asked Questions about action-controller

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

FAQPage Schema
How do I structure Rails controllers for RESTful actions and strong parameters?

Rails controllers use before_action filters to manage authentication and apply strong parameters for secure data handling. This approach ensures predictable behavior across RESTful actions and standardizes request routing.

What is the best way to handle rendering and redirects in API controllers?

API controllers handle rendering and redirects by returning structured responses. Use specific rendering strategies and error handling patterns to ensure reliable API communication and consistent status responses across Rails applications.

When do I need before_action filters in Rails controllers?

Rails controllers require before_action filters when you need to run authentication hooks or set up shared variables before executing actions. They ensure secure and consistent request processing across RESTful endpoints.

How do I compose Rails controllers with concerns and service objects?

Compose Rails controllers using concerns, service objects, and query objects to separate business logic from routing. This pattern maintains clean code structure and improves long-term maintainability across controller files.

Does this Rails controller pattern work for both API and web app responses?

The Rails controller pattern supports both API and web app responses through distinct rendering strategies. It handles error management, redirects, and authentication hooks for reliable HTML views and structured API data.

Why are my Rails strong parameters not permitting nested attributes?

Rails strong parameters require explicit permitting of nested attributes within controller actions. Check your parameter handling structure to ensure nested hashes are correctly allowed through the permitted params filter.