ActionController::Metal for Rails APIs

Hi there,

I’m currently developing a Rails API and I’ve stumbled upon some links on the internet about how to do so.
To be short, inheriting from ActionController::Metal is a way faster than inheriting from ActionController::Base because ActionController::Base loads a bunch of things that you’ll not need when developing an API.

I’m wondering if has any of you done that? If so, have you actually measure the differences between them?


I used it before, but I didn’t measure it. There is a great episode on this topic on railscast: #150 Rails Metal (revised) - RailsCasts

Currently, I’m using rails-api which is almost the same reason to slim my controller down.