module ViewModel::ActiveRecord::Controller

def create(serialize_context: new_serialize_context, deserialize_context: new_deserialize_context)

def create(serialize_context: new_serialize_context, deserialize_context: new_deserialize_context)
  update_hash, refs = parse_viewmodel_updates
  view = nil
  pre_rendered = viewmodel_class.transaction do
    view = viewmodel_class.deserialize_from_view(update_hash, references: refs, deserialize_context: deserialize_context)
    ViewModel.preload_for_serialization(view, serialize_context: serialize_context)
    view = yield(view) if block_given?
    prerender_viewmodel(view, serialize_context: serialize_context)
  end
  render_json_string(pre_rendered)
  view
end