Added item_property to where filter

This commit is contained in:
Aaron Broder 2014-05-08 11:35:51 -07:00
parent edfa1c8ecd
commit a5c1a01965
1 changed files with 2 additions and 2 deletions

View File

@ -185,9 +185,9 @@ module Jekyll
# value - desired value # value - desired value
# #
# Returns the filtered array of objects # Returns the filtered array of objects
def where(input, key, value) def where(input, property, value)
return input unless input.is_a?(Array) return input unless input.is_a?(Array)
input.select { |object| object[key] == value } input.select { |object| item_property(object, property) == value }
end end
# Sort an array of objects # Sort an array of objects