Rails::API - Lightweight Rails stack for headless API apps
“Rails is just an API,” say Alex (featured on episode #71) 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.
Discussion
Sign in or Join to comment or subscribe