I have an Api controller using ActionController :: Metal on Rails 4.1.6 as follows:
class Api < ActionController::Metal
include AbstractController::Rendering
include ActionController::ImplicitRender
include ActionController::MimeResponds
include ActionController::RequestForgeryProtection
include AbstractController::Callbacks
include ActionController::HttpAuthentication::Token::ControllerMethods
include ActionController::Head
...
end
However, if I put it in action
render 'not_found', status: 404
It correctly displays the "not_found" template, but returns a status code of 200. Performing the same render in ActionController :: Base, it returns the desired 404. What module am I missing here?
source
share