lib/scrivito/obj_data.rb in scrivito_sdk-0.65.1 vs lib/scrivito/obj_data.rb in scrivito_sdk-0.65.2

- old
+ new

@@ -22,21 +22,21 @@ def raw_value_and_type_of(attribute_name) raise NotImplementedError, "implement in subclass" end - def attribute_names_for_comparison + def attribute_names raise NotImplementedError, "implement in subclass" end def ==(other) return false unless other.is_a?(ObjData) - attribute_names = attribute_names_for_comparison | other.attribute_names_for_comparison - attribute_names.reject! { |attribute_name| attribute_name.starts_with?('_') } - attribute_names += %w[_path _permalink _widget_pool] + attrs = self.attribute_names | other.attribute_names + attrs.reject! { |attribute_name| attribute_name.starts_with?('_') } + attrs += %w[_path _permalink _widget_pool] - attribute_names.all? do |attribute_name| + attrs.all? do |attribute_name| value_of(attribute_name) == other.value_of(attribute_name) end end end end