Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Ruby
  3. Curly

Curly

Rubyv4.0.0

A Ruby template language that separates HTML structure from Ruby logic using presenter classes.

GitHubGitHub
592 stars21 forks0 contributors

What is Curly?

Curly is a template language for Ruby on Rails that completely separates HTML structure from Ruby logic by moving all presentation logic to presenter classes. It replaces `.erb` files with `.curly` templates, where components like `{{author}}` map to methods in a presenter, ensuring templates remain clean and logic is testable.

Target Audience

Ruby on Rails developers building maintainable web applications who want to avoid mixing Ruby code with HTML in templates. It's particularly useful for teams prioritizing clean separation of concerns in their view layer.

Value Proposition

Developers choose Curly for its strict separation of structure and logic, which leads to more maintainable and testable templates compared to traditional ERB. Its presenter-based approach reduces template complexity and integrates seamlessly with Rails conventions.

Overview

The Curly template language allows separating your logic from the structure of your HTML templates.

Use Cases

Best For

  • Enforcing clean separation between HTML and Ruby logic in Rails views
  • Building maintainable templates with all logic in testable presenter classes
  • Replacing ERB templates with a more structured alternative
  • Implementing caching strategies at the presenter level
  • Creating reusable widget-style components with context blocks
  • Integrating I18n or hierarchical data using identifiers like `{{i18n.homepage.header}}`

Not Ideal For

  • Projects requiring long-term maintenance and updates, as Curly is deprecated and no longer supported by Zendesk
  • Teams heavily invested in ERB or other templating engines with extensive gem ecosystems and community support
  • Rapid prototyping where the overhead of creating presenter classes for every template would slow iteration
  • Applications needing server-side rendering with minimal abstraction, preferring Rails' default ERB for simplicity

Pros & Cons

Pros

Strict Logic Separation

Enforces clean templates by moving all Ruby logic to presenter classes, making HTML declarative and logic unit-testable, as shown in the README's example of moving methods like `author_link` to a presenter.

Rails Native Integration

Seamlessly integrates with Rails helpers, layouts, content blocks, and RSpec testing, allowing use of methods like `link_to` and `content_for` within presenters without extra setup.

Flexible Component System

Supports advanced features like identifiers for hierarchical data (e.g., `{{i18n.homepage.header}}`), attributes for parameterized components, and context blocks for inline widget templates, enabling complex rendering scenarios.

Built-in Caching Control

Provides dynamic and static caching at the presenter level with methods like `cache_key` and `version`, simplifying cache expiration and integration with Rails' caching mechanisms.

Cons

Deprecated and Unmaintained

The project is officially no longer updated by Zendesk, with version 4.0.0 as the final release, posing risks for security, compatibility with future Rails versions, and lack of bug fixes.

Presenter Class Overhead

Requires creating a separate presenter class for every template or partial, which can add boilerplate and complexity for simple views compared to ERB's inline Ruby snippets.

Limited Adoption and Ecosystem

Has a smaller community and fewer third-party extensions compared to ERB or Haml, making it harder to find tutorials, plugins, or support for edge cases.

Syntax Learning Curve

Introduces a custom syntax (e.g., `{{*comments}}` for collections, `{{@component}}` for context blocks) that developers must learn, unlike ERB's more familiar Ruby-embedded approach.

Frequently Asked Questions

Quick Stats

Stars592
Forks21
Contributors0
Open Issues0
Last commit6 months ago
CreatedSince 2013

Tags

#html-templating#rails#separation-of-concerns#template-engine#ruby-gem#view-layer#ruby

Built With

R
Rails
R
Ruby

Included in

Ruby14.1k
Auto-fetched 9 hours ago

Related Projects

LiquidLiquid

Liquid markup language. Safe, customer facing template language for flexible web apps.

Stars11,875
Forks1,539
Last commit11 days ago
SlimSlim

Slim is a template language whose goal is to reduce the syntax to the essential parts without becoming cryptic.

Stars5,376
Forks498
Last commit1 month ago
HamlHaml

HTML Abstraction Markup Language - A Markup Haiku

Stars3,835
Forks589
Last commit6 days ago
MustacheMustache

Logic-less Ruby templates.

Stars3,084
Forks276
Last commit19 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub