Reputation: 858
How to get all taxons that are children of a certain taxonomy.
I retrieve the taxonomy like this:
Spree::Taxonomy.find_by_machine_name('product_categories')
Upvotes: 0
Views: 861
Reputation: 4911
A Spree::Taxonomy has_many :taxons so you should be able to do:
Spree::Taxonomy.find_by_machine_name('product_categories').taxons
Upvotes: 1