nesquena/rabl

General ruby templating with json, bson, xml, plist and msgpack support

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 10 minutes ago
Added to GitGenius on September 19th, 2026
Created on April 8th, 2011
Open Issues & Pull Requests: 122 (+0)
GitHub issues: Enabled
Number of forks: 332
Total Stargazers: 3,627 (+0)
Total Subscribers: 71 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 0.8 hours
Mean response time: 8.1 days
90th percentile: 3.5 days
Tracked items: 11

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,577 days
Stale 30+ days: 3
Stale 90+ days: 3

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • Bug (1)
  • Feature (1)
  • need triage (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

RABL is a Rails and Padrino templating system for generating JSON, XML, MessagePack, PList, and BSON responses from Ruby objects.

The tool addresses the limitations of ActiveRecord's built-in to_json method, which offers little control over API response structure. RABL moves API representation logic into the view layer, treating it as a templating problem rather than a model concern. It provides a Ruby DSL that lets developers create arbitrary nodes, rename attributes, conditionally include fields, render partials, and compose child data into parent responses without modifying the underlying models or database schema.

RABL suits projects where API responses diverge from database structure or require complex transformations. It works with any ORM and integrates directly into Rails and Padrino without configuration. Developers accustomed to ERB templates will find the syntax familiar. The tool is particularly valuable when you need to alias attributes, combine data from multiple sources into single nodes, or conditionally render fields based on application logic.

The project has experienced significant maintenance activity with multiple breaking changes introduced across versions to improve node naming consistency and reduce dependencies. Development has included deliberate architectural decisions such as removing the multi_json dependency in favor of direct JSON parsing and requiring explicit template rendering in test suites. The codebase continues to receive updates addressing edge cases and compatibility concerns, particularly around single-table inheritance model handling.