module ViewModel::Controller

def _extract_update_data(data)

def _extract_update_data(data)
  if data.is_a?(Array)
    if data.blank?
      raise ViewModel::Error.new(status: 400, detail: "No data submitted: #{data.inspect}")
    end
    data.map { |el| _extract_param_hash(el) }
  else
    _extract_param_hash(data)
  end
end