From 442a75da5daf3565a35c01507d190974ee25d76b Mon Sep 17 00:00:00 2001 From: f Date: Fri, 27 Apr 2018 15:59:51 -0300 Subject: [PATCH] comprobar que se hayan ordenado --- app/models/post.rb | 2 +- app/models/site.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index e70d24b..fe3fe7a 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -76,7 +76,7 @@ class Post get_front_matter 'order' end - def is_ordered? + def ordered? !order.nil? end diff --git a/app/models/site.rb b/app/models/site.rb index c085d61..67f0f41 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -204,7 +204,7 @@ class Site p.save end - true + posts_for(collection).map(&:ordered?).all? end alias :reorder_posts! :reorder_collection!