module ViewModel::ActiveRecord::Controller

def prerender_viewmodel(...)

def prerender_viewmodel(...)
  super do |jbuilder|
    yield(jbuilder) if block_given?
    # migrate the resulting structure before it's serialized to a json string
    if migration_versions.present?
      tree = jbuilder.attributes!
      migrator = ViewModel::DownMigrator.new(migration_versions)
      migrator.migrate!(tree)
    end
  end
end