From 6c6814f69ab8c4ce95c9e560213893b1878b01c1 Mon Sep 17 00:00:00 2001 From: Rien Maertens Date: Wed, 3 May 2017 23:08:15 +0200 Subject: [PATCH] Add check if blogpost has attribute --- lib/helpers/preprocess.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/helpers/preprocess.rb b/lib/helpers/preprocess.rb index 4a6a1ee..546197c 100644 --- a/lib/helpers/preprocess.rb +++ b/lib/helpers/preprocess.rb @@ -8,6 +8,7 @@ module PreprocessHelper def update_blog_attributes @items.find_all('/blog/**/*').each do |i| + raise "#{i.identifier} doesn't have 'created_at'" unless i[:created_at] i.update_attributes( # Tag all posts with article (for Blogging helper) kind: 'article',