module ViewModel::Controller
def render_viewmodel(viewmodel, status: nil, serialize_context: viewmodel.class.try(:new_serialize_context), &block)
def render_viewmodel(viewmodel, status: nil, serialize_context: viewmodel.class.try(:new_serialize_context), &block) prerender = prerender_viewmodel(viewmodel, serialize_context: serialize_context, &block) render_json_string(prerender, status: status) end