<commit_before># Acitree

This is Dragos Ursu's excellent tree view control made available as a Rails engine. Just include it in your Gemfile, bundle install and you can instantly start using the aciTree control!

Read more about this JQuery control here:
http://plugins.jquery.com/aciTree/

In your appplication.js:
    //= require acitree-rails

Add to application.css:
    *= require aciTree
    *= require demo

Now in your code:
    $('#tree').aciTree({
      ajax: { url: 'json/checkbox.json'},
      checkbox: true,
      checkboxName: 'checkbox1[]'
    });

You can dump a ActiveRecord object that uses acts_as_tree like so:
    def to_tree
      obj = {
        id: self.id,
        label: self.name,
        isFolder: true,
        open: true,
        checkbox: false,
        radio: false,
        childs: []
      }
      self.children.each do |child|
        obj[:childs].push child.to_tree
      end
      obj
    end
<commit_msg>fixing css to match javascript namging<commit_after># Acitree

This is Dragos Ursu's excellent tree view control made available as a Rails engine. Just include it in your Gemfile, bundle install and you can instantly start using the aciTree control!

Read more about this JQuery control here:
http://acoderinsights.ro/en/aciTree-tree-view-with-jQuery

API docs:
http://acoderinsights.ro/source/aciTree/documentation.html

To use the control, first modify appplication.js to include:
    //= require acitree-rails

Add to application.css:
    *= require aciTree

Now in your code:
    $('#tree').aciTree({
      ajax: { url: 'json/checkbox.json'},
      checkbox: true,
      checkboxName: 'checkbox1[]'
    });

You can dump a ActiveRecord object that uses acts_as_tree like so:
    def to_tree
      obj = {
        id: self.id,
        label: self.name,
        isFolder: true,
        open: true,
        checkbox: false,
        radio: false,
        childs: []
      }
      self.children.each do |child|
        obj[:childs].push child.to_tree
      end
      obj
    end

{'fraction_non_alphanumeric': 0.09149357072205737, 'fraction_numerical': 0.0009891196834817012, 'mean_word_length': 2.542907180385289, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1578204', 'n_tokens_mistral': 617, 'n_tokens_neox': 600, 'n_words': 212}