The Changelog

Open Source moves fast. Keep up.

Rails::API – Lightweight Rails stack for headless API apps

“Rails is just an API,” say Alex (featured on Episode 0.7.1) and others. Rails core team member Santiago Pastorino might not endorse the “just” part, but his Rails::API aims to provide a slimmer stack for those wanting to use Rails as an API backend for their client-side or mobile applications. The result is a fine-tuned subset of Rails, letting the developer opt-in to just the middleware needed. Rails::API requires a small change to your controllers:

# instead of
class ApplicationController < ActionController::Base
end

# do
class ApplicationController < ActionController::API
end

Check out the README for installation and advanced usage and Santiago’s blog post for more.

We’ll be covering a similar project, Lightrail, when we chat with Tony Arcieri about Celluloid next week.


Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.