From a5c1a01965e781445f38cac0666d14c17489099b Mon Sep 17 00:00:00 2001 From: Aaron Broder Date: Thu, 8 May 2014 11:35:51 -0700 Subject: [PATCH] Added item_property to where filter --- lib/jekyll/filters.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index 450e3d78..72d12868 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -185,9 +185,9 @@ module Jekyll # value - desired value # # Returns the filtered array of objects - def where(input, key, value) + def where(input, property, value) return input unless input.is_a?(Array) - input.select { |object| object[key] == value } + input.select { |object| item_property(object, property) == value } end # Sort an array of objects