From 3cf93b15b675bfe035faf47cfc234a9511f5a81c Mon Sep 17 00:00:00 2001 From: f Date: Fri, 27 Oct 2023 11:33:24 -0300 Subject: [PATCH] fix: usar Post.build --- app/models/site/index.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/site/index.rb b/app/models/site/index.rb index dc9f266f..213ef0bb 100644 --- a/app/models/site/index.rb +++ b/app/models/site/index.rb @@ -20,7 +20,7 @@ class Site jekyll.documents.each do |doc| doc.read! - Post.new(document: doc, site: self, layout: doc['layout'].to_sym).index! + Post.build(document: doc, site: self, layout: doc['layout'].to_sym).index! end update(last_indexed_commit: repository.head_commit.oid)