Class: SeatGeek::Taxonomies::ChildTree
- Inherits:
-
Object
- Object
- SeatGeek::Taxonomies::ChildTree
- Defined in:
- lib/seat_geek/taxonomies/child_tree.rb
Instance Method Summary collapse
Instance Method Details
#build_child_tree ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/seat_geek/taxonomies/child_tree.rb', line 4 def build_child_tree parent_object = taxonomies.detect { |taxonomy| taxonomy['id'] == parent_id } child_taxonomies = [parent_object] taxonomies.each do |taxonomy| child_taxonomies << taxonomy if taxonomy['parent_id'] == parent_id end child_taxonomies end |