tree_decorator 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tree_decorator/object_hanger.rb +3 -0
- metadata +1 -1
@@ -30,6 +30,9 @@ module TreeDecorator
|
|
30
30
|
|
31
31
|
if children and !children.empty?
|
32
32
|
children.each do |child|
|
33
|
+
unless child.respond_to? content_method
|
34
|
+
raise "Child does not have :#{content_method} method: #{child.inspect}"
|
35
|
+
end
|
33
36
|
content[child.send(content_method)] = populate_with_children(child)
|
34
37
|
end
|
35
38
|
end
|