“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
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.