lib/scrivito/backend/path_index.rb in scrivito_sdk-1.9.1 vs lib/scrivito/backend/path_index.rb in scrivito_sdk-1.10.0.rc1

- old
+ new

@@ -1,31 +1,28 @@ module Scrivito module Backend module PathIndex -class << self + extend Backend::Index - include Backend::Index - - def id + def self.id "path" end - def query(keys) + def self.query(keys) [{ field: '_path', operator: :equals, value: keys }] end - def extract_update_value_from_data(data) + def self.extract_update_value_from_data(data) data["_path"] end - def group_by_multiple(paths, obj_datas) + def self.group_by_multiple(paths, obj_datas) paths.map do |path| obj_datas.select { |obj_data| obj_data.value_of("_path") == path } end end -end end end end