add array support to where filter

This commit is contained in:
Tim Wisniewski 2016-02-20 19:46:48 -05:00
parent 03a7e22b7e
commit 64ad293b89
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ module Jekyll
def where(input, property, value)
return input unless input.is_a?(Enumerable)
input = input.values if input.is_a?(Hash)
input.select { |object| item_property(object, property).to_s == value.to_s }
input.select { |object| item_property(object, property).to_s == value.to_s or item_property(object, property).include? value.to_s }
end
# Sort an array of objects