diff --git a/app/models/post.rb b/app/models/post.rb index bd80b2c..e2950a8 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -232,6 +232,13 @@ class Post date_to_time! clean_content! slugify_title! + remove_empty_front_matter! + end + + def remove_empty_front_matter! + @front_matter.delete_if do |k,v| + v.blank? + end end # Aplica limpiezas básicas del contenido