presenter

Encapsulate view formatting and display logic in Presenter objects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Presenters encapsulate view-specific formatting and display logic away from models, improving readability, testability, and reuse across views.

Core Features & Use Cases

  • Encapsulates date/number formatting and conditional display for clean view rendering
  • Delegates to the underlying model while offering a stable presentation API
  • Supports consistent UI tokens and styling integration with Rails views

Quick Start

Create a presenter for a given model and begin by writing specs to drive the behavior.

Frequently Asked Questions about presenter

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

FAQPage Schema
How do I isolate view logic from Rails models?

Isolate view logic from Rails models by encapsulating date formatting, badges, and conditional display rules in Presenter objects built on SimpleDelegator, keeping models thin and views consistent.

What is a presenter in Rails and when do I need one?

A presenter in Rails is a Decorator object that extracts view-specific formatting and conditional display logic from models. You need one when display logic clutters models or needs reuse across multiple controllers and views.

How do I test Rails presenters with RSpec and TDD?

Test Rails presenters with RSpec by writing specs first to drive behavior, validating that the presenter correctly formats data and delegates methods to the underlying model before implementing the presentation logic.

Does this Rails presenter approach require Ruby 3.0 and Rails 8?

Yes, this presenter approach requires Ruby 3.0+ and Rails 8+. It uses a SimpleDelegator-based BasePresenter to delegate to underlying models while offering a stable presentation API.

What's the best way to extract formatting logic from Rails views?

The best way to extract formatting logic from Rails views is using a Presenter pattern to encapsulate date and number formatting, supporting consistent UI tokens and styling integration while maintaining testability.

When should I not use a presenter or decorator in Rails?

You should avoid using a presenter in Rails when the view-related logic is minimal or uniquely scoped to a single view, as introducing a decorator layer for trivial formatting adds unnecessary abstraction without improving reuse.