Module: AgileCategoryHelper
- Defined in:
- app/helpers/agile_category_helper.rb
Overview
Helper for editing categories as tree view.
Instance Method Summary collapse
-
#categories_as_tree ⇒ Object
Returns code for editing categories in a treeview.
Instance Method Details
#categories_as_tree ⇒ Object
Returns code for editing categories in a treeview
33 34 35 36 37 |
# File 'app/helpers/agile_category_helper.rb', line 33 def categories_as_tree head = '<div id="catagories-as-tree"><ul><li data-id="nil"><span class="mi-o mi-home"></span>' data = ArCategory.where(parent: nil).order(order: :asc).to_a (head + html_for_category_tree(data) + '</li></ul></div>' + js_for_category_tree).html_safe end |