From f18d0213dfc4d769ce58fc8ad3d898fd8a65f508 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 27 Sep 2023 15:40:14 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20guardar=20el=20=C3=BAltimo=20commit=20i?= =?UTF-8?q?ndexado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/site/index.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/site/index.rb b/app/models/site/index.rb index e11095e3..f728b48b 100644 --- a/app/models/site/index.rb +++ b/app/models/site/index.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true -# Indexa todos los artículos de un sitio -# -# TODO: Hacer opcional class Site + # Indexa todos los artículos de un sitio + # + # TODO: Hacer opcional module Index extend ActiveSupport::Concern @@ -15,6 +15,8 @@ class Site def index_posts! Site.transaction do docs.each(&:index!) + + update(last_indexed_commit: repository.head_commit.oid) end end end