lib/locabulary.rb in locabulary-0.3.0 vs lib/locabulary.rb in locabulary-0.3.1

- old
+ new

@@ -52,10 +52,10 @@ end def associate_parents_and_childrens_for(hierarchy_graph_keys, items, predicate_name) items.each do |item| begin - hierarchy_graph_keys.fetch(item.parent_term_label).children << item unless item.parent_slugs.empty? + hierarchy_graph_keys.fetch(item.parent_term_label).add_child(item) unless item.parent_slugs.empty? rescue KeyError => error raise Exceptions::MissingHierarchicalParentError.new(predicate_name, error) end end end