class ActionController::Responder
def api_behavior
def api_behavior raise MissingRenderer.new(format) unless has_renderer? if get? display resource elsif post? display resource, status: :created, location: api_location else head :no_content end end